当前位置: 首页 > news >正文

5000做网站无障碍网站建设的意义

5000做网站,无障碍网站建设的意义,大发 wordpress,网站服务器商1.思路 1.1 样式 样式为常驻前台的一个小窗口#xff0c;小窗口上有三到四个按钮#xff0c;为一级功能#xff0c;是当前工作内容的常用功能窗口#xff0c;有十个二级窗口#xff0c;为选中窗口时的扩展选项#xff0c;有若干后台功能#xff0c;可选中至前台 可最…1.思路 1.1 样式 样式为常驻前台的一个小窗口小窗口上有三到四个按钮为一级功能是当前工作内容的常用功能窗口有十个二级窗口为选中窗口时的扩展选项有若干后台功能可选中至前台 可最小化至窗口栏最小化按钮在窗口底部 窗口为无边框 1.2具体功能 1.设置代办 复制一段文本后添加代办 2.复制填表 2.功能细节 1.窗口名称Me.Text 工作助手 2.常驻前台Me.TopMost True 3.无边框Me.FormBorderStyle FormBorderStyle.None 4.窗体圆角  引用Imports System.Drawing.Drawing2D Call 窗体圆角(Me, 20)Sub 窗体圆角(form As Form, rgnRadius As Integer)Dim bs As GraphicsPath New GraphicsPathbs.AddLine(rgnRadius, 0, Me.Width - rgnRadius * 2, 0)bs.AddArc(Me.Width - rgnRadius * 2, 0, rgnRadius * 2, rgnRadius * 2, 270, 90)bs.AddLine(Me.Width, rgnRadius, Me.Width, Me.Height - rgnRadius * 2)bs.AddArc(Me.Width - rgnRadius * 2, Me.Height - rgnRadius * 2, rgnRadius * 2, rgnRadius * 2, 0, 90)bs.AddLine(Me.Width - rgnRadius * 2, Me.Height, rgnRadius, Me.Height)bs.AddArc(0, Me.Height - rgnRadius * 2, rgnRadius * 2, rgnRadius * 2, 90, 90)bs.AddLine(0, Me.Height - rgnRadius * 2, 0, rgnRadius * 2)bs.AddArc(0, 0, rgnRadius * 2, rgnRadius * 2, 180, 90)bs.CloseFigure()Me.Region New Region(bs)End Sub 可是用画图法制作的窗体圆角有很明显的锯齿不符合商业化需求 使用双缓冲默认情况下标准Windows 窗体控件是双缓冲的。可以通过两种方法对窗体和所创作的控件启用默认双缓冲。一种方法是将DoubleBuffered属性设置为true另一种方法是通过调用SetStyle方法将OptimizedDoubleBuffer标志设置为true。两种方法都将为窗体或控件启用默认双缓冲并提供无闪烁的图形呈现。建议仅对已为其编写所有呈现代码的自定义控件调用SetStyle方法。 Public Sub New() InitializeComponent() SetStyle(ControlStyles.UserPaint, True) SetStyle(ControlStyles.AllPaintingInWmPaint, True) SetStyle(ControlStyles.OptimizedDoubleBuffer, True) End Sub 最后尝试了双重绘但是又出现黑角 Imports System.Drawing.Drawing2D Imports System.Runtime.InteropServicesPublic Class Form1Public Sub New() 此调用是设计器所必需的。InitializeComponent()SetStyle(ControlStyles.UserPaint, True)SetStyle(ControlStyles.AllPaintingInWmPaint, True)SetStyle(ControlStyles.OptimizedDoubleBuffer, True)Me.Text 工作助手Me.TopMost TrueMe.FormBorderStyle FormBorderStyle.NoneCall 窗体圆角(Me, 20)End SubProtected Overrides Sub OnPaintBackground(e As PaintEventArgs) 不调用基类的OnPaintBackground避免背景被画出End SubProtected Overrides Sub OnPaint(e As PaintEventArgs)Dim g As Graphics e.Graphicsg.SmoothingMode Drawing2D.SmoothingMode.AntiAliasg.CompositingQuality Drawing2D.CompositingQuality.HighQualityg.InterpolationMode Drawing2D.InterpolationMode.HighQualityBicubic绘制圆角矩形Dim rect As New Rectangle(0, 0, Me.Width, Me.Height)Dim path As New Drawing2D.GraphicsPath()Dim ar As Integerar 50path.AddArc(rect.X, rect.Y, ar, ar, 180, 90)path.AddArc(rect.X rect.Width - ar, rect.Y, ar, ar, 270, 90)path.AddArc(rect.X rect.Width - ar, rect.Y rect.Height - ar, ar, ar, 0, 90)path.AddArc(rect.X, rect.Y rect.Height - ar, ar, ar, 90, 90)path.CloseFigure()g.FillPath(Brushes.White, path)MyBase.OnPaint(e)End SubSub 窗体圆角(form As Form, rgnRadius As Integer)Dim bs As GraphicsPath New GraphicsPathbs.AddLine(rgnRadius, 0, Me.Width - rgnRadius * 2, 0)bs.AddArc(Me.Width - rgnRadius * 2, 0, rgnRadius * 2, rgnRadius * 2, 270, 90)bs.AddLine(Me.Width, rgnRadius, Me.Width, Me.Height - rgnRadius * 2)bs.AddArc(Me.Width - rgnRadius * 2, Me.Height - rgnRadius * 2, rgnRadius * 2, rgnRadius * 2, 0, 90)bs.AddLine(Me.Width - rgnRadius * 2, Me.Height, rgnRadius, Me.Height)bs.AddArc(0, Me.Height - rgnRadius * 2, rgnRadius * 2, rgnRadius * 2, 90, 90)bs.AddLine(0, Me.Height - rgnRadius * 2, 0, rgnRadius * 2)bs.AddArc(0, 0, rgnRadius * 2, rgnRadius * 2, 180, 90)bs.CloseFigure()Me.Region New Region(bs)End SubEnd Class 最后尝试了使用WPF窗体完美解决圆角问题 Window x:ClassMainWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:工作助手WPFmc:IgnorabledTitleMainWindow Height300 Width200WindowStyleNoneResizeModeNoResizeAllowsTransparencyTrueBackgroundTransparentGrid SnapsToDevicePixelsTrueBorder BackgroundWhite BorderThickness1 CornerRadius10Button ContentButton Margin49,57,49,204//Border/Grid /Window 5.设置icon 6.设置窗口初始位置右下角 Dim screenWidth As Integer SystemParameters.PrimaryScreenWidthDim screenHeight As Integer SystemParameters.PrimaryScreenHeightDim workHeight As Integer SystemParameters.WorkArea.HeightMsgBox(-- screenWidth -- screenHeight -- workHeight)Me.Left screenWidth - Me.WidthMe.Top workHeight - Me.Height 7.设置类似qq的吸附效果这里附上完整代码 Imports System.Timers.Timer Imports System.Windows.FormsClass MainWindowInherits WindowPublic Sub New()InitializeComponent() 设置窗口的初始位置贴紧任务栏Me.WindowStartupLocation WindowStartupLocation.CenterScreen 显示在屏幕中心Me.WindowStartupLocation WindowStartupLocation.Manual 在指定位置显示Dim screenWidth As Integer SystemParameters.PrimaryScreenWidthDim screenHeight As Integer SystemParameters.PrimaryScreenHeightDim workHeight As Integer SystemParameters.WorkArea.HeightMsgBox(-- screenWidth -- screenHeight -- workHeight)Me.Left screenWidth - Me.WidthMe.Top workHeight - Me.HeightEnd Sub Protected Overrides Sub OnMouseLeftButtonDown(ByVal e As MouseButtonEventArgs) 拖动窗体MyBase.OnMouseLeftButtonDown(e)Me.DragMove()End SubPrivate hh As Boolean FalsePrivate tt As Boolean FalsePrivate timer As New TimerPrivate Sub MainWindow_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loadedtimer.Enabled TrueAddHandler timer.Tick, AddressOf timertickEnd SubPrivate Sub timertick()If hh True ThenIf System.Windows.Forms.Cursor.Position.X clien()(0) - 5 And (System.Windows.Forms.Cursor.Position.Y Me.Top And System.Windows.Forms.Cursor.Position.Y Me.Top Me.Height) ThenMe.Left clien()(0) - Me.WidthEnd IfEnd IfIf tt True ThenIf System.Windows.Forms.Cursor.Position.Y 1 And (System.Windows.Forms.Cursor.Position.X Me.Left And System.Windows.Forms.Cursor.Position.X Me.Left Me.Width) ThenMe.Top 1End IfEnd IfEnd SubPrivate Sub MainWindow_MouseEnter(sender As Object, e As System.Windows.Input.MouseEventArgs) Handles Me.MouseEnterIf hh True ThenMe.Left clien()(0) - Me.Widthhh FalseEnd IfIf tt True ThenMe.Top 1tt FalseEnd IfEnd SubFunction clien()Return {System.Windows.Forms.Screen.FromPoint(New System.Drawing.Point).Bounds.Width, System.Windows.Forms.Screen.FromPoint(New System.Drawing.Point).Bounds.Height}End FunctionPrivate Sub MainWindow_MouseLeave(sender As Object, e As System.Windows.Input.MouseEventArgs) Handles Me.MouseLeaveIf Me.Top 1 And Me.Left Me.Width clien()(0) ThenMe.Top -Me.Height 5Me.Left clien()(0) - Me.Widthtt TrueElsehidden()shhtop()End IfEnd SubSub hidden()If Me.Left Me.Width clien()(0) ThenMe.Left clien()(0) - 5hh TrueEnd IfEnd SubSub shhtop()If Me.Top 1 ThenMe.Top -Me.Height 5tt TrueEnd IfEnd SubSub btn_upload_Click()End SubSub btn_close_Click()End Sub End Class 问题一其中System.Windows.Forms引用不到 解决方案 UseWindowsFormstrue/UseWindowsForms 放置的位置是【项目名】.csproj文件在Visual Studio 2022 里双击项目名可以打开这个文件。 PropertyGroupOutputTypeWinExe/OutputTypeTargetFrameworknet6.0-windows/TargetFrameworkNullableenable/NullableUseWPFtrue/UseWPFAssemblyVersion1.0.1/AssemblyVersionFileVersion1.0.1.0/FileVersionUseWindowsFormstrue/UseWindowsForms/PropertyGroup 问题二当鼠标停在屏幕顶部时窗口会不停闪烁因为窗口没有完全隐藏鼠标反复进出窗口所以将-Me.Height 0做成临界值使窗口不再闪烁 问题三由于电脑有缩放导致对鼠标的位置判断有问题有偏移所以要先获取电脑缩放比 (System.Windows.Forms.Cursor.Position.X / 1.25 Me.Left And System.Windows.Forms.Cursor.Position.X / 1.25 Me.Left Me.Width) 我的电脑缩放比试125%所以这里要除以1.25 8.调试Debug.WriteLine(hello) 3.打包exe 3.1.vs能生成exe但是debug中的其他文件也要拷贝给客户才能运行就是要复制一个文件包对于小程序不方便。以下方法可以通过rar压缩软件制作exe文件但是如果进行了最后一步给压缩包自定义图标在其他电脑上运行会报毒但是不改图标程序又是压缩包的图标不够专业。所以本人不想使用此方式。 https://www.cnblogs.com/cmblogs/p/9782855.html 3.2打包成独立的exe依据以下博客 VS 程序打包成一个独立的exe - Enigma Virtual Box-CSDN博客 3.3.vs2022生成单exe文件和不需安装.NET DESKTOP runtime 运行的方法 部署模式选独立文件发布模式勾选生成单个文件整个打包不需要电脑安装.net。 如果用依赖框架的形式安装点击程序运行时会自动跳转安装也挺快的。 3.4之前能正常运行重新打开后InitializeComponent()报错解决办法删除项目目录中obj文件夹重新打开项目。 继续写的话就太长留在下一节了。 最后附一下当前的成效吧能自动吸附隐藏在上边框。
http://www.dnsts.com.cn/news/201193.html

相关文章:

  • 范县网站建设费用郑州市做网站公司a汉狮
  • e网站建设园艺建设网站
  • 网站框架设计wordpress菜单颜色
  • 海南论坛网站建设息壤空间怎么上传网站
  • 网站宽屏背景汕头建设
  • 营销类型的公司网站站长统计app软件
  • 石家庄最好的网站建设公司网站开展营销的思路和方法
  • 苏州美丽乡村建设网站电子商务公司网站怎么建
  • 医疗网站建设资讯用DW做的网站生成链接
  • 网站跳出率多少合适网站建设怎么分析市场分析
  • 中国造价工程建设监理协会网站学院网站建设项目
  • 如何建立一个网站并运行类似于小红书的江苏商城网站建设
  • 建电子商务网站多少钱wordpress安装乱码
  • 微教育云平台网站建设代发网站建设
  • 做360手机网站快速排名软件做网站需要多大空间
  • 建设商城类网站多少钱一个服务器可以备案几个网站吗
  • 个人网站首页设计欣赏中小企业网站建设价位
  • 网站二级页面怎么做公司企业简介图片
  • 简单易做的的网站网站建设好不好学
  • 网站推广app软件下载有什么网站是专做婚礼素材的
  • 如何快速推广一个网站青岛seo精灵
  • 优惠券网站怎么做腾讯云注册域名dnspod
  • 商城WordPress东莞seoseo关键词排名优化
  • 网站管理的主要工作有哪些滕州盛扬网络公司网站建设推广
  • seo网站推广 杭州seo流量是什么意思
  • 如何将自己做的网站放到网上wordpress国外网站
  • 网站要怎么做的.name后缀的网站
  • 网站如何做服务器授权书wordpress让访客停留
  • 华强北手机网站建设腾讯云wordpress搭建网站
  • php网站开发工程师笔试网站解析ip地址