Advertisement
Guest User

Thème code

a guest
Jan 16th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.61 KB | None | 0 0
  1. Imports System, System.Collections.Generic, System.Runtime.InteropServices, System.ComponentModel
  2. Imports System.Drawing, System.Drawing.Drawing2D, System.Drawing.Imaging, System.Windows.Forms
  3.  
  4. Enum MouseState As Byte
  5. None = 0
  6. Over = 1
  7. Down = 2
  8. Block = 3
  9. End Enum
  10.  
  11.  
  12. '--------------------- [ Theme ] --------------------
  13. 'Creator: Tankiste
  14. 'Site: youporn.com
  15. 'Contact: remicool76@gmail.com
  16. 'Created: 11/22/2011
  17. 'Changed: 11/23/2011
  18. '-------------------- [ /Theme ] ---------------------
  19. Public Class ReactorTheme : Inherits ContainerControl
  20.  
  21. Dim WithEvents CloseBtn As New ReactorTopButton With {.Location = New Point(412, 7), .ButtonType = ReactorTopButton.topButtonType.Close, .CloseButtonFunction = ReactorTopButton.closeFunc.CloseForm}
  22. Dim WithEvents MinimBtn As New ReactorTopButton With {.Location = New Point(393, 7), .ButtonType = ReactorTopButton.topButtonType.Minimize}
  23.  
  24. #Region " Control Help - Movement & Flicker Control "
  25. Private MouseP As Point = New Point(0, 0)
  26. Private Cap As Boolean = False
  27. Private MoveHeight As Integer
  28. Protected Overrides Sub OnPaintBackground(ByVal e As System.Windows.Forms.PaintEventArgs)
  29. End Sub
  30. Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  31. MyBase.OnMouseDown(e)
  32. If e.Button = Windows.Forms.MouseButtons.Left And New Rectangle(0, 0, Width, MoveHeight).Contains(e.Location) Then
  33. Cap = True : MouseP = e.Location
  34. End If
  35. End Sub
  36. Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
  37. MyBase.OnMouseUp(e) : Cap = False
  38. End Sub
  39. Protected Overrides Sub OnMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs)
  40. MyBase.OnMouseMove(e)
  41. If Cap Then
  42. Parent.Location = MousePosition - MouseP
  43. End If
  44. End Sub
  45. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  46. MyBase.OnTextChanged(e)
  47. Invalidate()
  48. End Sub
  49.  
  50. #End Region
  51.  
  52. Sub New()
  53. MyBase.New()
  54. Dock = DockStyle.Fill
  55. MoveHeight = 45
  56. Font = New Font("Verdana", 6.75F)
  57. DoubleBuffered = True
  58.  
  59. Controls.Add(CloseBtn)
  60. Controls.Add(MinimBtn)
  61. End Sub
  62.  
  63. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  64. Dim G As Graphics = e.Graphics
  65. MyBase.OnPaint(e)
  66. If Not Me.ParentForm.FormBorderStyle = FormBorderStyle.None Then
  67. Me.ParentForm.FormBorderStyle = FormBorderStyle.None
  68. End If
  69.  
  70. CloseBtn.Location = New Point(Width - 23, 7)
  71. MinimBtn.Location = New Point(Width - 42, 7)
  72.  
  73. Dim glossLGB As New LinearGradientBrush(New Rectangle(0, 0, Width, 15), Color.FromArgb(102, 97, 93), Color.FromArgb(55, 54, 52), 90S)
  74. Dim glossLGB2 As New LinearGradientBrush(New Rectangle(0, 15, Width, 15), Color.Black, Color.FromArgb(26, 25, 21), 90S)
  75. Dim shadowLGB As New LinearGradientBrush(New Rectangle(5, 31, Width - 11, 20), Color.FromArgb(23, 23, 22), Color.FromArgb(38, 38, 38), 90S)
  76.  
  77. G.Clear(Color.FromArgb(26, 25, 21))
  78. G.FillRectangle(glossLGB, New Rectangle(0, 0, Width, 15))
  79. G.FillRectangle(glossLGB2, New Rectangle(0, 15, Width, 15))
  80. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(42, 41, 37))), 4, 30, Width - 9, Height - 36)
  81. G.FillRectangle(New SolidBrush(Color.FromArgb(38, 38, 38)), New Rectangle(5, 31, Width - 11, Height - 38))
  82. G.FillRectangle(shadowLGB, New Rectangle(5, 31, Width - 11, 20))
  83. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(24, 24, 24))), 5, 32, Width - 7, 32)
  84. G.DrawRectangle(Pens.Black, New Rectangle(5, 31, Width - 11, Height - 38))
  85. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(151, 150, 146))), 1, 1, Width - 2, 1)
  86.  
  87. G.DrawRectangle(Pens.Black, New Rectangle(0, 0, Width - 1, Height - 1))
  88.  
  89. 'G.DrawString(Text, Font, Brushes.Black, Width / 2 - (3 * Text.Length) + 3, 7)
  90. 'G.DrawString(Text, Font, Brushes.White, Width / 2 - (3 * Text.Length) + 3, 8)
  91. G.DrawString(Text, Font, Brushes.Black, New Rectangle(0, 10, Width - 1, 10), New StringFormat With {.LineAlignment = StringAlignment.Center, .Alignment = StringAlignment.Center})
  92. G.DrawString(Text, Font, Brushes.White, New Rectangle(0, 11, Width - 1, 11), New StringFormat With {.LineAlignment = StringAlignment.Center, .Alignment = StringAlignment.Center})
  93. End Sub
  94. End Class
  95.  
  96.  
  97. '--------------------- [ Button ] --------------------
  98. 'Creator: oVERT3Xo
  99. 'Site: **********.net
  100. 'Contact: oVERT3Xo@hotmail.com
  101. 'Created: 11/22/2011
  102. 'Changed: 11/23/2011
  103. '-------------------- [ /Button ] ---------------------
  104. Public Class ReactorButton : Inherits Control
  105.  
  106. #Region " Control Help - MouseState & Flicker Control"
  107. Private State As MouseState = MouseState.None
  108. Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs)
  109. MyBase.OnMouseEnter(e)
  110. State = MouseState.Over
  111. Invalidate()
  112. End Sub
  113. Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  114. MyBase.OnMouseDown(e)
  115. State = MouseState.Down
  116. Invalidate()
  117. End Sub
  118. Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
  119. MyBase.OnMouseLeave(e)
  120. State = MouseState.None
  121. Invalidate()
  122. End Sub
  123. Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
  124. MyBase.OnMouseUp(e)
  125. State = MouseState.Over
  126. Invalidate()
  127. End Sub
  128. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  129. End Sub
  130. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  131. MyBase.OnTextChanged(e)
  132. Invalidate()
  133. End Sub
  134. #End Region
  135.  
  136. Sub New()
  137. MyBase.New()
  138. BackColor = Color.FromArgb(38, 38, 38)
  139. Font = New Font("Verdana", 6.75F)
  140. DoubleBuffered = True
  141. End Sub
  142.  
  143. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  144. Dim G As Graphics = e.Graphics
  145. MyBase.OnPaint(e)
  146.  
  147. G.Clear(Color.FromArgb(36, 34, 30))
  148.  
  149. Select Case State
  150. Case MouseState.None 'Mouse None
  151. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(36, 34, 30))), 2, Height - 1, Width - 4, Height - 1)
  152. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, Width - 1, Height - 2), Color.FromArgb(10, 9, 8), Color.FromArgb(31, 29, 26), 90S)
  153. G.FillRectangle(backGrad, New Rectangle(1, 1, Width - 1, Height - 2))
  154. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(46, 45, 44))), New Rectangle(1, 1, Width - 3, Height - 4))
  155. Case MouseState.Over 'Mouse Hover
  156. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(46, 44, 38))), 2, Height - 1, Width - 4, Height - 1)
  157. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, Width - 1, Height - 2), Color.FromArgb(219, 78, 0), Color.FromArgb(230, 95, 0), 90S)
  158. G.FillRectangle(backGrad, New Rectangle(1, 1, Width - 1, Height - 2))
  159. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(245, 120, 10))), New Rectangle(1, 1, Width - 3, Height - 4))
  160. Case MouseState.Down 'Mouse Down
  161. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(36, 34, 30))), 2, Height - 1, Width - 4, Height - 1)
  162. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, Width - 1, Height - 2), Color.FromArgb(209, 68, 0), Color.FromArgb(210, 75, 0), 270S)
  163. G.FillRectangle(backGrad, New Rectangle(1, 1, Width - 1, Height - 2))
  164. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(225, 110, 30))), New Rectangle(1, 1, Width - 3, Height - 4))
  165. End Select
  166.  
  167. Dim glossGradient As New LinearGradientBrush(New Rectangle(1, 1, Width - 2, Height / 2 - 2), Color.FromArgb(80, Color.White), Color.FromArgb(50, Color.White), 90S)
  168. G.FillRectangle(glossGradient, New Rectangle(1, 1, Width - 2, Height / 2 - 2))
  169. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(21, 20, 18))), New Rectangle(0, 0, Width - 1, Height - 2))
  170.  
  171. G.DrawString(Text, Font, Brushes.Black, New Rectangle(0, -2, Width - 1, Height - 1), New StringFormat With {.LineAlignment = StringAlignment.Center, .Alignment = StringAlignment.Center})
  172. G.DrawString(Text, Font, Brushes.White, New Rectangle(0, -1, Width - 1, Height - 1), New StringFormat With {.LineAlignment = StringAlignment.Center, .Alignment = StringAlignment.Center})
  173. End Sub
  174. End Class
  175.  
  176.  
  177. '--------------------- [ TopButton ] --------------------
  178. 'Creator: oVERT3Xo
  179. 'Site: **********.net
  180. 'Contact: oVERT3Xo@hotmail.com
  181. 'Created: 11/22/2011
  182. 'Changed: 11/23/2011
  183. '-------------------- [ /TopButton ] ---------------------
  184. Public Class ReactorTopButton : Inherits Control
  185.  
  186. #Region " Control Help - MouseState & Flicker Control"
  187. Dim buttonColor As Color
  188. Enum topButtonType As Byte
  189. Blank = 0
  190. Minimize = 1
  191. Maximize = 2
  192. Close = 3
  193. End Enum
  194. Private State As MouseState = MouseState.None
  195. Private _tbType As topButtonType = topButtonType.Blank
  196. Public Property ButtonType() As topButtonType
  197. Get
  198. Return _tbType
  199. End Get
  200. Set(ByVal v As topButtonType)
  201. _tbType = v
  202. Invalidate()
  203. End Set
  204. End Property
  205. Private _defaultFunc As Boolean = True
  206. Public Property UseStandardFunction() As Boolean
  207. Get
  208. Return _defaultFunc
  209. End Get
  210. Set(ByVal v As Boolean)
  211. _defaultFunc = v
  212. End Set
  213. End Property
  214.  
  215. Enum closeFunc As Byte
  216. CloseForm = 0
  217. CloseApp = 1
  218. End Enum
  219. Private _closeFunc As closeFunc = 0
  220. Public Property CloseButtonFunction() As closeFunc
  221. Get
  222. Return _closeFunc
  223. End Get
  224. Set(ByVal v As closeFunc)
  225. _closeFunc = v
  226. End Set
  227. End Property
  228. Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs)
  229. MyBase.OnMouseEnter(e)
  230. State = MouseState.Over
  231. Invalidate()
  232. End Sub
  233. Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  234. MyBase.OnMouseDown(e)
  235. State = MouseState.Down
  236. Invalidate()
  237. End Sub
  238. Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
  239. MyBase.OnMouseLeave(e)
  240. State = MouseState.None
  241. Invalidate()
  242. End Sub
  243. Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
  244. MyBase.OnMouseUp(e)
  245. State = MouseState.Over
  246. Invalidate()
  247. End Sub
  248. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  249. End Sub
  250. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  251. MyBase.OnTextChanged(e)
  252. Invalidate()
  253. End Sub
  254. Sub buttonFunction() Handles Me.Click
  255. Select Case _defaultFunc
  256. Case True
  257. Select Case ButtonType
  258. Case topButtonType.Close
  259. Select Case CloseButtonFunction
  260. Case 0
  261. Me.Parent.FindForm.Close()
  262. Case 1
  263. Application.Exit()
  264. End
  265. End Select
  266. Case topButtonType.Minimize
  267. Me.Parent.FindForm.WindowState = FormWindowState.Minimized
  268. Case topButtonType.Maximize
  269. Me.Parent.FindForm.WindowState = FormWindowState.Maximized
  270. End Select
  271. End Select
  272. End Sub
  273. #End Region
  274.  
  275. Sub New()
  276. MyBase.New()
  277. BackColor = Color.FromArgb(38, 38, 38)
  278. Font = New Font("Verdana", 6.75F)
  279. Size = New Size(17, 17)
  280. DoubleBuffered = True
  281. End Sub
  282.  
  283. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  284. Dim G As Graphics = e.Graphics
  285. MyBase.OnPaint(e)
  286.  
  287. Size = New Size(17, 17)
  288. G.Clear(Color.FromArgb(36, 34, 30))
  289.  
  290. Select Case State
  291. Case MouseState.None 'Mouse None
  292. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(36, 34, 30))), 2, Height - 1, Width - 4, Height - 1)
  293. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, Width - 1, Height - 2), Color.FromArgb(10, 9, 8), Color.FromArgb(31, 29, 26), 90S)
  294. G.FillRectangle(backGrad, New Rectangle(1, 1, Width - 1, Height - 2))
  295. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(46, 45, 44))), New Rectangle(1, 1, Width - 3, Height - 4))
  296. buttonColor = Color.FromArgb(163, 163, 162)
  297. Case MouseState.Over 'Mouse Hover
  298. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(46, 44, 38))), 2, Height - 1, Width - 4, Height - 1)
  299. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, Width - 1, Height - 2), Color.FromArgb(219, 78, 0), Color.FromArgb(230, 95, 0), 90S)
  300. G.FillRectangle(backGrad, New Rectangle(1, 1, Width - 1, Height - 2))
  301. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(245, 120, 10))), New Rectangle(1, 1, Width - 3, Height - 4))
  302. buttonColor = Color.FromArgb(255, 255, 255)
  303. Case MouseState.Down 'Mouse Down
  304. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(36, 34, 30))), 2, Height - 1, Width - 4, Height - 1)
  305. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, Width - 1, Height - 2), Color.FromArgb(10, 9, 8), Color.FromArgb(31, 29, 26), 270S)
  306. G.FillRectangle(backGrad, New Rectangle(1, 1, Width - 1, Height - 2))
  307. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(46, 45, 44))), New Rectangle(1, 1, Width - 3, Height - 4))
  308.  
  309. End Select
  310.  
  311. Select Case ButtonType
  312. Case topButtonType.Minimize
  313. G.FillRectangle(New SolidBrush(buttonColor), New Rectangle(4, 10, 9, 2))
  314. Case topButtonType.Maximize
  315. G.DrawRectangle(New Pen(New SolidBrush(buttonColor)), New Rectangle(4, 4, 8, 7))
  316. G.DrawLine(New Pen(New SolidBrush(buttonColor)), 4, 5, Width - 6, 5)
  317. Case topButtonType.Close
  318. G.DrawLine(New Pen(New SolidBrush(buttonColor), 2), 4, 4, 12, 11)
  319. G.DrawLine(New Pen(New SolidBrush(buttonColor), 2), 12, 4, 4, 11)
  320. G.DrawLine(New Pen(New SolidBrush(buttonColor)), 4, 4, 5, 5)
  321. G.DrawLine(New Pen(New SolidBrush(buttonColor)), 4, 11, 5, 10)
  322. End Select
  323.  
  324. Dim glossGradient As New LinearGradientBrush(New Rectangle(1, 1, Width - 2, 7), Color.FromArgb(80, Color.White), Color.FromArgb(50, Color.White), 90S)
  325. G.FillRectangle(glossGradient, New Rectangle(1, 1, Width - 2, 7))
  326. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(21, 20, 18))), New Rectangle(0, 0, Width - 1, Height - 2))
  327. End Sub
  328. End Class
  329.  
  330.  
  331. '--------------------- [ ProgressBar ] --------------------
  332. 'Creator: oVERT3Xo
  333. 'Site: **********.net
  334. 'Contact: oVERT3Xo@hotmail.com
  335. 'Created: 11/22/2011
  336. 'Changed: 11/23/2011
  337. '-------------------- [ /ProgressBar ] ---------------------
  338. Public Class ReactorProgressBar : Inherits Control
  339.  
  340. #Region " Control Help - Properties & Flicker Control "
  341. Private OFS As Integer = 0
  342. Private Speed As Integer = 50
  343. Private _Maximum As Integer = 100
  344. Public Property Maximum() As Integer
  345. Get
  346. Return _Maximum
  347. End Get
  348. Set(ByVal v As Integer)
  349. Select Case v
  350. Case Is < _Value
  351. _Value = v
  352. End Select
  353. _Maximum = v
  354. Invalidate()
  355. End Set
  356. End Property
  357. Private _Value As Integer = 0
  358. Public Property Value() As Integer
  359. Get
  360. Select Case _Value
  361. Case 0
  362. Return 1
  363. Case Else
  364. Return _Value
  365. End Select
  366. End Get
  367. Set(ByVal v As Integer)
  368. Select Case v
  369. Case Is > _Maximum
  370. v = _Maximum
  371. End Select
  372. _Value = v
  373. Invalidate()
  374. End Set
  375. End Property
  376. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  377. End Sub
  378. Protected Overrides Sub CreateHandle()
  379. MyBase.CreateHandle()
  380. ' Dim tmr As New Timer With {.Interval = Speed}
  381. ' AddHandler tmr.Tick, AddressOf Animate
  382. ' tmr.Start()
  383. Dim T As New Threading.Thread(AddressOf Animate)
  384. T.IsBackground = True
  385. T.Start()
  386. End Sub
  387. Sub Animate()
  388. While True
  389. If OFS <= Width Then : OFS += 1
  390. Else : OFS = 0
  391. End If
  392. Invalidate()
  393. Threading.Thread.Sleep(Speed)
  394. End While
  395. End Sub
  396. #End Region
  397.  
  398. Sub New()
  399. MyBase.New()
  400. DoubleBuffered = True
  401. End Sub
  402.  
  403. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  404. Dim G As Graphics = e.Graphics
  405. MyBase.OnPaint(e)
  406.  
  407. Dim intValue As Integer = CInt(_Value / _Maximum * Width)
  408. G.Clear(Color.FromArgb(38, 38, 38))
  409.  
  410. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, intValue - 1, Height - 2), Color.FromArgb(10, 9, 8), Color.FromArgb(31, 29, 26), 90S)
  411. G.FillRectangle(backGrad, New Rectangle(1, 1, intValue - 1, Height - 2))
  412. Dim hatch As New HatchBrush(HatchStyle.WideUpwardDiagonal, Color.FromArgb(175, 219, 78, 0), Color.FromArgb(175, 229, 98, 0))
  413. G.RenderingOrigin = New Point(OFS, 0)
  414. G.FillRectangle(hatch, New Rectangle(1, 1, intValue - 2, Height - 2))
  415. Dim glossGradient As New LinearGradientBrush(New Rectangle(1, 1, intValue - 2, Height / 2 - 1), Color.FromArgb(80, Color.White), Color.FromArgb(50, Color.White), 90S)
  416. G.FillRectangle(glossGradient, New Rectangle(1, 1, intValue - 2, Height / 2 - 1))
  417.  
  418. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(10, 10, 10))), New Rectangle(0, 0, Width - 1, Height - 1))
  419. G.DrawRectangle((New Pen(New SolidBrush(Color.Black))), New Rectangle(1, 1, Width - 3, Height - 3))
  420. G.DrawRectangle((New Pen(New SolidBrush(Color.FromArgb(70, 70, 70)))), New Rectangle(0, 0, Width - 1, Height - 1))
  421. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, Width, 0)
  422. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, 0, Height)
  423. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), Width - 1, 0, Width - 1, Height)
  424.  
  425. End Sub
  426. End Class
  427.  
  428.  
  429. '--------------------- [ TextBox (Multi) ] --------------------
  430. 'Creator: oVERT3Xo
  431. 'Site: **********.net
  432. 'Contact: oVERT3Xo@hotmail.com
  433. 'Created: 11/22/2011
  434. 'Changed: 11/23/2011
  435. '-------------------- [ /TextBox (Multi) ] ---------------------
  436. Public Class ReactorMultiLineTextBox : Inherits Control
  437. Dim WithEvents txtbox As New TextBox
  438.  
  439. #Region " Control Help - Properties & Flicker Control "
  440. Private _maxchars As Integer = 32767
  441. Public Property MaxCharacters() As Integer
  442. Get
  443. Return _maxchars
  444. End Get
  445. Set(ByVal v As Integer)
  446. _maxchars = v
  447. Invalidate()
  448. End Set
  449. End Property
  450. Private _align As HorizontalAlignment
  451. Public Property TextAlign() As HorizontalAlignment
  452. Get
  453. Return _align
  454. End Get
  455. Set(ByVal v As HorizontalAlignment)
  456. _align = v
  457. Invalidate()
  458. End Set
  459. End Property
  460.  
  461.  
  462. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  463. End Sub
  464. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  465. MyBase.OnTextChanged(e)
  466. Invalidate()
  467. End Sub
  468. Protected Overrides Sub OnBackColorChanged(ByVal e As System.EventArgs)
  469. MyBase.OnBackColorChanged(e)
  470. txtbox.BackColor = BackColor
  471. Invalidate()
  472. End Sub
  473. Protected Overrides Sub OnForeColorChanged(ByVal e As System.EventArgs)
  474. MyBase.OnForeColorChanged(e)
  475. txtbox.ForeColor = ForeColor
  476. Invalidate()
  477. End Sub
  478. Protected Overrides Sub OnSizeChanged(ByVal e As System.EventArgs)
  479. MyBase.OnSizeChanged(e)
  480. txtbox.Size = New Size(Width - 10, Height - 11)
  481. End Sub
  482. Protected Overrides Sub OnFontChanged(ByVal e As System.EventArgs)
  483. MyBase.OnFontChanged(e)
  484. txtbox.Font = Font
  485. End Sub
  486. Protected Overrides Sub OnGotFocus(ByVal e As System.EventArgs)
  487. MyBase.OnGotFocus(e)
  488. txtbox.Focus()
  489. End Sub
  490. Sub TextChngTxtBox() Handles txtbox.TextChanged
  491. Text = txtbox.Text
  492. End Sub
  493. Sub TextChng() Handles MyBase.TextChanged
  494. txtbox.Text = Text
  495. End Sub
  496. Sub NewTextBox()
  497. With txtbox
  498. .Multiline = True
  499. .BackColor = BackColor
  500. .ForeColor = ForeColor
  501. .Text = String.Empty
  502. .TextAlign = HorizontalAlignment.Center
  503. .BorderStyle = BorderStyle.None
  504. .Location = New Point(2, 4)
  505. .Font = New Font("Verdana", 7.25)
  506. .Size = New Size(Width - 10, Height - 10)
  507. End With
  508. End Sub
  509. #End Region
  510.  
  511. Sub New()
  512. MyBase.New()
  513.  
  514. NewTextBox()
  515. Controls.Add(txtbox)
  516.  
  517. Text = ""
  518. BackColor = Color.FromArgb(37, 37, 37)
  519. ForeColor = Color.White
  520. Size = New Size(135, 35)
  521. DoubleBuffered = True
  522. End Sub
  523.  
  524. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  525. Dim G As Graphics = e.Graphics
  526. MyBase.OnPaint(e)
  527.  
  528. txtbox.TextAlign = TextAlign
  529.  
  530. G.FillRectangle(New SolidBrush(Color.FromArgb(37, 37, 37)), New Rectangle(1, 1, Width - 2, Height - 2))
  531. G.DrawRectangle((New Pen(New SolidBrush(Color.Black))), New Rectangle(1, 1, Width - 3, Height - 3))
  532. G.DrawRectangle((New Pen(New SolidBrush(Color.FromArgb(70, 70, 70)))), New Rectangle(0, 0, Width - 1, Height - 1))
  533. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, Width, 0)
  534. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, 0, Height)
  535. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), Width - 1, 0, Width - 1, Height)
  536. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(31, 31, 31))), 2, 2, Width - 3, 2)
  537. End Sub
  538. End Class
  539.  
  540.  
  541. '--------------------- [ TextBox ] --------------------
  542. 'Creator: oVERT3Xo
  543. 'Site: **********.net
  544. 'Contact: oVERT3Xo@hotmail.com
  545. 'Created: 11/22/2011
  546. 'Changed: 11/23/2011
  547. '-------------------- [ /TextBox ] ---------------------
  548. Public Class ReactorTextBox : Inherits Control
  549. Dim WithEvents txtbox As New TextBox
  550.  
  551. #Region " Control Help - Properties & Flicker Control "
  552. Private _passmask As Boolean = False
  553. Public Property UsePasswordMask() As Boolean
  554. Get
  555. Return _PassMask
  556. End Get
  557. Set(ByVal v As Boolean)
  558. _PassMask = v
  559. Invalidate()
  560. End Set
  561. End Property
  562. Private _maxchars As Integer = 32767
  563. Public Property MaxCharacters() As Integer
  564. Get
  565. Return _maxchars
  566. End Get
  567. Set(ByVal v As Integer)
  568. _maxchars = v
  569. Invalidate()
  570. End Set
  571. End Property
  572. Private _align As HorizontalAlignment
  573. Public Property TextAlign() As HorizontalAlignment
  574. Get
  575. Return _align
  576. End Get
  577. Set(ByVal v As HorizontalAlignment)
  578. _align = v
  579. Invalidate()
  580. End Set
  581. End Property
  582.  
  583. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  584. End Sub
  585. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  586. MyBase.OnTextChanged(e)
  587. Invalidate()
  588. End Sub
  589. Protected Overrides Sub OnBackColorChanged(ByVal e As System.EventArgs)
  590. MyBase.OnBackColorChanged(e)
  591. txtbox.BackColor = BackColor
  592. Invalidate()
  593. End Sub
  594. Protected Overrides Sub OnForeColorChanged(ByVal e As System.EventArgs)
  595. MyBase.OnForeColorChanged(e)
  596. txtbox.ForeColor = ForeColor
  597. Invalidate()
  598. End Sub
  599. Protected Overrides Sub OnFontChanged(ByVal e As System.EventArgs)
  600. MyBase.OnFontChanged(e)
  601. txtbox.Font = Font
  602. End Sub
  603. Protected Overrides Sub OnGotFocus(ByVal e As System.EventArgs)
  604. MyBase.OnGotFocus(e)
  605. txtbox.Focus()
  606. End Sub
  607.  
  608. Sub TextChngTxtBox() Handles txtbox.TextChanged
  609. Text = txtbox.Text
  610. End Sub
  611. Sub TextChng() Handles MyBase.TextChanged
  612. txtbox.Text = Text
  613. End Sub
  614. Sub NewTextBox()
  615. With txtbox
  616. .Multiline = False
  617. .BackColor = BackColor
  618. .ForeColor = ForeColor
  619. .Text = String.Empty
  620. .TextAlign = HorizontalAlignment.Center
  621. .BorderStyle = BorderStyle.None
  622. .Location = New Point(5, 5)
  623. .Font = New Font("Verdana", 7.25)
  624. .Size = New Size(Width - 10, Height - 11)
  625. .UseSystemPasswordChar = UsePasswordMask
  626. End With
  627.  
  628. End Sub
  629. #End Region
  630.  
  631. Sub New()
  632. MyBase.New()
  633.  
  634. NewTextBox()
  635. Controls.Add(txtbox)
  636.  
  637. Text = ""
  638. BackColor = Color.FromArgb(37, 37, 37)
  639. ForeColor = Color.White
  640. Size = New Size(135, 35)
  641. DoubleBuffered = True
  642. End Sub
  643.  
  644. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  645. Dim G As Graphics = e.Graphics
  646. MyBase.OnPaint(e)
  647.  
  648. Height = txtbox.Height + 11
  649. With txtbox
  650. .Width = Width - 10
  651. .TextAlign = TextAlign
  652. .UseSystemPasswordChar = UsePasswordMask
  653. End With
  654.  
  655. G.Clear(BackColor)
  656. G.FillRectangle(New SolidBrush(Color.FromArgb(37, 37, 37)), New Rectangle(1, 1, Width - 2, Height - 2))
  657. G.DrawRectangle((New Pen(New SolidBrush(Color.Black))), New Rectangle(1, 1, Width - 3, Height - 3))
  658. G.DrawRectangle((New Pen(New SolidBrush(Color.FromArgb(70, 70, 70)))), New Rectangle(0, 0, Width - 1, Height - 1))
  659. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, Width, 0)
  660. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, 0, Height)
  661. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), Width - 1, 0, Width - 1, Height)
  662. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(31, 31, 31))), 2, 2, Width - 3, 2)
  663. End Sub
  664. End Class
  665.  
  666.  
  667. '--------------------- [ ListBox ] --------------------
  668. 'Creator: oVERT3Xo
  669. 'Site: **********.net
  670. 'Contact: oVERT3Xo@hotmail.com
  671. 'Created: 11/22/2011
  672. 'Changed: 11/23/2011
  673. '-------------------- [ /ListBox ] ---------------------
  674. Public Class ReactorListBox : Inherits Control
  675. Public WithEvents lstbox As New ListBox
  676. Private __Items As String() = {""}
  677.  
  678. #Region " Control Help - Properties & Flicker Control "
  679.  
  680. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  681. End Sub
  682. Protected Overrides Sub OnSizeChanged(ByVal e As System.EventArgs)
  683. MyBase.OnSizeChanged(e)
  684. lstbox.Size = New Size(Width - 6, Height - 6)
  685. Invalidate()
  686. End Sub
  687. Protected Overrides Sub OnBackColorChanged(ByVal e As System.EventArgs)
  688. MyBase.OnBackColorChanged(e)
  689. lstbox.BackColor = BackColor
  690. Invalidate()
  691. End Sub
  692. Protected Overrides Sub OnForeColorChanged(ByVal e As System.EventArgs)
  693. MyBase.OnForeColorChanged(e)
  694. lstbox.ForeColor = ForeColor
  695. Invalidate()
  696. End Sub
  697. Protected Overrides Sub OnFontChanged(ByVal e As System.EventArgs)
  698. MyBase.OnFontChanged(e)
  699. lstbox.Font = Font
  700. End Sub
  701. Protected Overrides Sub OnGotFocus(ByVal e As System.EventArgs)
  702. MyBase.OnGotFocus(e)
  703. lstbox.Focus()
  704. End Sub
  705.  
  706. Public Property Items As String()
  707. Get
  708. Return __Items
  709. Invalidate()
  710. End Get
  711. Set(ByVal value As String())
  712. __Items = value
  713. lstbox.Items.Clear()
  714. Invalidate()
  715. lstbox.Items.AddRange(value)
  716. Invalidate()
  717. End Set
  718. End Property
  719. Public ReadOnly Property SelectedItem() As String
  720. Get
  721. Return lstbox.SelectedItem
  722. End Get
  723. End Property
  724. Sub DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles lstbox.DrawItem
  725. Try
  726. e.DrawBackground()
  727. e.Graphics.DrawString(lstbox.Items(e.Index).ToString(), _
  728. e.Font, New SolidBrush(lstbox.ForeColor), e.Bounds, StringFormat.GenericDefault)
  729. e.DrawFocusRectangle()
  730. Catch
  731. End Try
  732. End Sub
  733. Sub AddRange(ByVal Items As Object())
  734. lstbox.Items.Remove("")
  735. lstbox.Items.AddRange(Items)
  736. Invalidate()
  737. End Sub
  738. Sub AddItem(ByVal Item As Object)
  739. lstbox.Items.Add(Item)
  740. Invalidate()
  741. End Sub
  742. Sub NewListBox()
  743. lstbox.Size = New Size(126, 96)
  744. lstbox.BorderStyle = BorderStyle.None
  745. lstbox.DrawMode = DrawMode.OwnerDrawVariable
  746. lstbox.Location = New Point(4, 4)
  747. lstbox.ForeColor = Color.FromArgb(216, 216, 216)
  748. lstbox.BackColor = Color.FromArgb(38, 38, 38)
  749. lstbox.Items.Clear()
  750. End Sub
  751.  
  752. #End Region
  753.  
  754. Sub New()
  755. MyBase.New()
  756.  
  757. NewListBox()
  758. Controls.Add(lstbox)
  759.  
  760. Size = New Size(131, 101)
  761. BackColor = Color.FromArgb(38, 38, 38)
  762. DoubleBuffered = True
  763. End Sub
  764.  
  765. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  766. Dim G As Graphics = e.Graphics
  767. MyBase.OnPaint(e)
  768.  
  769. G.Clear(BackColor)
  770. G.FillRectangle(New SolidBrush(Color.FromArgb(37, 37, 37)), New Rectangle(1, 1, Width - 2, Height - 2))
  771. G.DrawRectangle((New Pen(New SolidBrush(Color.Black))), New Rectangle(1, 1, Width - 3, Height - 3))
  772. G.DrawRectangle((New Pen(New SolidBrush(Color.FromArgb(70, 70, 70)))), New Rectangle(0, 0, Width - 1, Height - 1))
  773. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, Width, 0)
  774. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, 0, Height)
  775. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), Width - 1, 0, Width - 1, Height)
  776. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(31, 31, 31))), 2, 2, Width - 3, 2)
  777. End Sub
  778. End Class
  779.  
  780.  
  781. '--------------------- [ ComboBox ] --------------------
  782. 'Creator: oVERT3Xo
  783. 'Site: **********.net
  784. 'Contact: oVERT3Xo@hotmail.com
  785. 'Created: 11/22/2011
  786. 'Changed: 11/23/2011
  787. '-------------------- [ /ComboBox ] ---------------------
  788. Public Class ReactorComboBox : Inherits ComboBox
  789.  
  790. #Region " Control Help - Properties & Flicker Control "
  791. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  792. End Sub
  793. Private _StartIndex As Integer = 0
  794. Public Property StartIndex As Integer
  795. Get
  796. Return _StartIndex
  797. End Get
  798. Set(ByVal value As Integer)
  799. _StartIndex = value
  800. Try
  801. MyBase.SelectedIndex = value
  802. Catch
  803. End Try
  804. Invalidate()
  805. End Set
  806. End Property
  807. Private LightBlack As Color = Color.FromArgb(37, 37, 37)
  808. Private LighterBlack As Color = Color.FromArgb(60, 60, 60)
  809. Sub ReplaceItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles Me.DrawItem
  810. e.DrawBackground()
  811. Try
  812. If (e.State And DrawItemState.Selected) = DrawItemState.Selected Then
  813. e.Graphics.FillRectangle(New SolidBrush(Color.FromArgb(229, 88, 0)), e.Bounds) '37 37 37
  814. End If
  815. Using b As New SolidBrush(e.ForeColor)
  816. e.Graphics.DrawString(MyBase.GetItemText(MyBase.Items(e.Index)), e.Font, b, e.Bounds)
  817. End Using
  818. Catch
  819. End Try
  820. e.DrawFocusRectangle()
  821. End Sub
  822. Protected Sub DrawTriangle(ByVal Clr As Color, ByVal FirstPoint As Point, ByVal SecondPoint As Point, ByVal ThirdPoint As Point, ByVal G As Graphics)
  823. Dim points As New List(Of Point)()
  824. points.Add(FirstPoint)
  825. points.Add(SecondPoint)
  826. points.Add(ThirdPoint)
  827. G.FillPolygon(New SolidBrush(Clr), points.ToArray)
  828. End Sub
  829. #End Region
  830.  
  831. Sub New()
  832. MyBase.New()
  833. SetStyle(ControlStyles.AllPaintingInWmPaint Or _
  834. ControlStyles.ResizeRedraw Or _
  835. ControlStyles.UserPaint Or _
  836. ControlStyles.DoubleBuffer, True)
  837. DrawMode = Windows.Forms.DrawMode.OwnerDrawFixed
  838. BackColor = Color.FromArgb(45, 45, 45)
  839. ForeColor = Color.White
  840. DropDownStyle = ComboBoxStyle.DropDownList
  841. DoubleBuffered = True
  842. Invalidate()
  843. End Sub
  844.  
  845. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  846. MyBase.OnPaint(e)
  847. Dim G As Graphics = e.Graphics
  848. Dim T As LinearGradientBrush = New LinearGradientBrush(New Rectangle(0, 0, Width, 10), Color.FromArgb(62, Color.White), Color.FromArgb(30, Color.White), 90S)
  849. Dim DrawCornersBrush As SolidBrush
  850. DrawCornersBrush = New SolidBrush(Color.FromArgb(37, 37, 37))
  851. Try
  852. With G
  853. .SmoothingMode = SmoothingMode.HighQuality
  854. .Clear(Color.FromArgb(37, 37, 37))
  855. .FillRectangle(T, New Rectangle(Width - 20, 0, Width, 9))
  856. .DrawLine(Pens.Black, Width - 20, 0, Width - 20, Height)
  857. Try
  858. '.DrawString(Items(SelectedIndex).ToString, Font, Brushes.White, New Rectangle(New Point(3, 3), New Size(Width - 18, Height)))
  859. .DrawString(Text, Font, Brushes.White, New Rectangle(3, 0, Width - 20, Height), New StringFormat With {.LineAlignment = StringAlignment.Center, .Alignment = StringAlignment.Near})
  860. Catch
  861. End Try
  862.  
  863. .DrawLine(New Pen(New SolidBrush(Color.FromArgb(37, 37, 37))), 0, 0, 0, 0)
  864. .DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(0, 0, 0))), New Rectangle(1, 1, Width - 3, Height - 3))
  865.  
  866. .DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, Width, 0)
  867. .DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, 0, Height)
  868. .DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), Width - 1, 0, Width - 1, Height)
  869. .DrawLine(New Pen(New SolidBrush(Color.FromArgb(70, 70, 70))), 0, Height - 1, Width, Height - 1)
  870.  
  871. DrawTriangle(Color.White, New Point(Width - 14, 8), New Point(Width - 7, 8), New Point(Width - 11, 11), G)
  872. End With
  873. Catch
  874. End Try
  875. End Sub
  876. End Class
  877.  
  878.  
  879. '--------------------- [ TabControl ] --------------------
  880. 'Creator: oVERT3Xo
  881. 'Site: **********.net
  882. 'Contact: oVERT3Xo@hotmail.com
  883. 'Created: 11/22/2011
  884. 'Changed: 11/23/2011
  885. '-------------------- [ /TabControl ] ---------------------
  886. Public Class ReactorTabControl : Inherits TabControl
  887.  
  888. #Region " Control Help - Properties & Flicker Control "
  889. Private DrawGradientBrush, DrawGradientBrush2 As LinearGradientBrush
  890. Private _TabBrColor As Color
  891. Public Property TabBorderColor() As Color
  892. Get
  893. Return _TabBrColor
  894. End Get
  895. Set(ByVal v As Color)
  896. _TabBrColor = v
  897. Invalidate()
  898. End Set
  899. End Property
  900. Private _ControlBColor As Color
  901. Public Property TabTextColor() As Color
  902. Get
  903. Return _ControlBColor
  904. End Get
  905. Set(ByVal v As Color)
  906. _ControlBColor = v
  907. Invalidate()
  908. End Set
  909. End Property
  910. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  911. End Sub
  912. #End Region
  913.  
  914. Sub New()
  915. MyBase.New()
  916. SetStyle(ControlStyles.AllPaintingInWmPaint Or _
  917. ControlStyles.ResizeRedraw Or _
  918. ControlStyles.UserPaint Or _
  919. ControlStyles.DoubleBuffer, True)
  920.  
  921. TabBorderColor = Color.White
  922. TabTextColor = Color.White
  923.  
  924. End Sub
  925.  
  926. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  927. Dim G As Graphics = e.Graphics
  928. MyBase.OnPaint(e)
  929.  
  930. Dim r2 As New Rectangle(0, 0, Width - 1, 25)
  931. Dim r3 As New Rectangle(0, 0, Width - 1, 25)
  932. Dim r4 As New Rectangle(2, 0, Width - 1, 13)
  933. Dim ItemBounds As Rectangle
  934. Dim TextBrush As New SolidBrush(Color.Empty)
  935. Dim TabBrush As New SolidBrush(Color.DimGray)
  936. Dim dgb2 As New LinearGradientBrush(r4, Color.FromArgb(50, Color.White), Color.FromArgb(25, Color.White), 90S)
  937.  
  938. G.Clear(Color.FromArgb(32, 32, 32))
  939. DrawGradientBrush2 = New LinearGradientBrush(r3, Color.FromArgb(10, 10, 10), Color.FromArgb(50, 50, 50), 90S)
  940. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(28, 28, 28))), New Rectangle(1, 1, Width - 3, Height - 3))
  941.  
  942. G.FillRectangle(DrawGradientBrush2, r2)
  943. G.FillRectangle(dgb2, r4)
  944.  
  945. For TabItemIndex As Integer = 0 To Me.TabCount - 1
  946. ItemBounds = Me.GetTabRect(TabItemIndex)
  947.  
  948. If CBool(TabItemIndex And 1) Then
  949. TabBrush.Color = Color.Transparent
  950. Else
  951. TabBrush.Color = Color.Transparent
  952. End If
  953. G.FillRectangle(TabBrush, ItemBounds)
  954. Dim BorderPen As Pen
  955. If TabItemIndex = SelectedIndex Then
  956. BorderPen = New Pen(Color.Transparent, 1)
  957. Dim dgb As New LinearGradientBrush(New Rectangle(ItemBounds.Location.X + 3, ItemBounds.Location.Y + 3, ItemBounds.Width - 8, ItemBounds.Height - 6), Color.FromArgb(175, 219, 78, 0), Color.FromArgb(175, 229, 98, 0), 90S)
  958. Dim gloss As New LinearGradientBrush(New Rectangle(ItemBounds.Location.X + 3, ItemBounds.Location.Y + 3, ItemBounds.Width - 8, ItemBounds.Height / 2 - 5), Color.FromArgb(80, Color.White), Color.FromArgb(20, Color.White), 90S)
  959. G.FillRectangle(dgb, New Rectangle(ItemBounds.Location.X + 3, ItemBounds.Location.Y + 3, ItemBounds.Width - 8, ItemBounds.Height - 6))
  960. G.FillRectangle(gloss, New Rectangle(ItemBounds.Location.X + 3, ItemBounds.Location.Y + 3, ItemBounds.Width - 8, ItemBounds.Height / 2 - 4))
  961. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(10, 10, 10))), New Rectangle(ItemBounds.Location.X + 3, ItemBounds.Location.Y + 3, ItemBounds.Width - 8, ItemBounds.Height - 6))
  962. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(100, 230, 90, 0))), New Rectangle(ItemBounds.Location.X + 4, ItemBounds.Location.Y + 4, ItemBounds.Width - 10, ItemBounds.Height - 8))
  963. Dim r1 As New Rectangle(1, 1, Width - 1, 3)
  964. Else
  965. BorderPen = New Pen(Color.Transparent, 1)
  966. End If
  967.  
  968. G.DrawRectangle(BorderPen, New Rectangle(ItemBounds.Location.X + 3, ItemBounds.Location.Y + 1, ItemBounds.Width - 8, ItemBounds.Height - 4))
  969.  
  970. BorderPen.Dispose()
  971.  
  972. Dim sf As New StringFormat
  973. sf.LineAlignment = StringAlignment.Center
  974. sf.Alignment = StringAlignment.Center
  975.  
  976. If Me.SelectedIndex = TabItemIndex Then
  977. TextBrush.Color = TabTextColor
  978. Else
  979. TextBrush.Color = Color.DimGray
  980. End If
  981. G.DrawString( _
  982. Me.TabPages(TabItemIndex).Text, _
  983. Me.Font, TextBrush, _
  984. RectangleF.op_Implicit(Me.GetTabRect(TabItemIndex)), sf)
  985. Try
  986. Me.TabPages(TabItemIndex).BackColor = Color.FromArgb(32, 32, 32)
  987. Catch
  988. End Try
  989. Next
  990. Try
  991. For Each tabpg As TabPage In Me.TabPages
  992. tabpg.BorderStyle = BorderStyle.None
  993. Next
  994. Catch
  995. End Try
  996.  
  997. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(10, 10, 10))), 2, 24, Width - 2, 24)
  998. G.DrawRectangle((New Pen(New SolidBrush(Color.Black))), New Rectangle(1, 1, Width - 3, Height - 3))
  999. G.DrawRectangle((New Pen(New SolidBrush(Color.FromArgb(70, 70, 70)))), New Rectangle(0, 0, Width - 1, Height - 1))
  1000. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, Width, 0)
  1001. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, 0, Height)
  1002. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), Width - 1, 0, Width - 1, Height)
  1003. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(31, 31, 31))), 2, 2, Width - 3, 2)
  1004. End Sub
  1005. End Class
  1006.  
  1007.  
  1008. '--------------------- [ CheckBox ] --------------------
  1009. 'Creator: oVERT3Xo
  1010. 'Site: **********.net
  1011. 'Contact: oVERT3Xo@hotmail.com
  1012. 'Created: 11/22/2011
  1013. 'Changed: 11/23/2011
  1014. '-------------------- [ /CheckBox ] ---------------------
  1015. <DefaultEvent("CheckedChanged")> Public Class ReactorCheckBox : Inherits Control
  1016.  
  1017. #Region " Control Help - MouseState & Flicker Control"
  1018. Private State As MouseState = MouseState.None
  1019. Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs)
  1020. MyBase.OnMouseEnter(e)
  1021. State = MouseState.Over
  1022. Invalidate()
  1023. End Sub
  1024. Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  1025. MyBase.OnMouseDown(e)
  1026. State = MouseState.Down
  1027. Invalidate()
  1028. End Sub
  1029. Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
  1030. MyBase.OnMouseLeave(e)
  1031. State = MouseState.None
  1032. Invalidate()
  1033. End Sub
  1034. Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
  1035. MyBase.OnMouseUp(e)
  1036. State = MouseState.Over
  1037. Invalidate()
  1038. End Sub
  1039. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  1040. End Sub
  1041. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  1042. MyBase.OnTextChanged(e)
  1043. Invalidate()
  1044. End Sub
  1045. Private _Checked As Boolean
  1046. Property Checked() As Boolean
  1047. Get
  1048. Return _Checked
  1049. End Get
  1050. Set(ByVal value As Boolean)
  1051. _Checked = value
  1052. Invalidate()
  1053. End Set
  1054. End Property
  1055.  
  1056. Protected Overrides Sub OnClick(ByVal e As System.EventArgs)
  1057. _Checked = Not _Checked
  1058. RaiseEvent CheckedChanged(Me)
  1059. MyBase.OnClick(e)
  1060. End Sub
  1061. Event CheckedChanged(ByVal sender As Object)
  1062. #End Region
  1063.  
  1064. Sub New()
  1065. MyBase.New()
  1066. BackColor = Color.FromArgb(38, 38, 38)
  1067. ForeColor = Color.White
  1068. End Sub
  1069.  
  1070. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  1071. MyBase.OnPaint(e)
  1072. Dim G As Graphics = e.Graphics
  1073.  
  1074. Height = 16
  1075.  
  1076. G.Clear(BackColor)
  1077.  
  1078. Dim bordColor As Color = Color.FromArgb(46, 45, 44)
  1079. Dim backGrad As New LinearGradientBrush(New Rectangle(1, 1, 14, Height - 2), Color.FromArgb(10, 9, 8), Color.FromArgb(31, 29, 26), 90S)
  1080. Dim glossGradient As New LinearGradientBrush(New Rectangle(1, 1, 13, Height / 2 - 2), Color.FromArgb(80, Color.White), Color.FromArgb(50, Color.White), 90S)
  1081.  
  1082. If _Checked Then
  1083. bordColor = Color.FromArgb(225, 110, 30)
  1084. backGrad = New LinearGradientBrush(New Rectangle(1, 1, 14, Height - 2), Color.FromArgb(209, 68, 0), Color.FromArgb(210, 75, 0), 90S)
  1085. Else
  1086. bordColor = Color.FromArgb(46, 45, 44)
  1087. backGrad = New LinearGradientBrush(New Rectangle(1, 1, 14, Height - 2), Color.FromArgb(24, 24, 24), Color.FromArgb(30, 30, 30), 90S)
  1088. End If
  1089.  
  1090. G.DrawString(Text, Font, New SolidBrush(ForeColor), New Point(18, Height / 2 + (Font.Height) - 18))
  1091.  
  1092. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(36, 34, 30))), 2, Height - 1, 14, Height - 1)
  1093. G.FillRectangle(backGrad, New Rectangle(1, 1, 14, Height - 2))
  1094. G.DrawRectangle(New Pen(New SolidBrush(bordColor)), New Rectangle(1, 1, 12, Height - 4))
  1095. If _Checked Then : G.FillRectangle(glossGradient, New Rectangle(1, 1, 13, Height / 2 - 2))
  1096. End If
  1097. G.DrawRectangle(New Pen(New SolidBrush(Color.FromArgb(10, 10, 10))), New Rectangle(0, 0, 14, Height - 2))
  1098. End Sub
  1099.  
  1100. End Class
  1101.  
  1102.  
  1103. '--------------------- [ RadioButton ] --------------------
  1104. 'Creator: oVERT3Xo
  1105. 'Site: **********.net
  1106. 'Contact: oVERT3Xo@hotmail.com
  1107. 'Created: 11/22/2011
  1108. 'Changed: 11/23/2011
  1109. '-------------------- [ /RadioButton ] ---------------------
  1110. <DefaultEvent("CheckedChanged")> Public Class ReactorRadioButton : Inherits Control
  1111.  
  1112. #Region " Control Help - MouseState & Flicker Control"
  1113. Private R1 As Rectangle
  1114. Private G1 As LinearGradientBrush
  1115.  
  1116. Private State As MouseState = MouseState.None
  1117. Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs)
  1118. MyBase.OnMouseEnter(e)
  1119. State = MouseState.Over
  1120. Invalidate()
  1121. End Sub
  1122. Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  1123. MyBase.OnMouseDown(e)
  1124. State = MouseState.Down
  1125. Invalidate()
  1126. End Sub
  1127. Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
  1128. MyBase.OnMouseLeave(e)
  1129. State = MouseState.None
  1130. Invalidate()
  1131. End Sub
  1132. Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
  1133. MyBase.OnMouseUp(e)
  1134. State = MouseState.Over
  1135. Invalidate()
  1136. End Sub
  1137. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  1138. End Sub
  1139. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  1140. MyBase.OnTextChanged(e)
  1141. Invalidate()
  1142. End Sub
  1143. Private _Checked As Boolean
  1144. Property Checked() As Boolean
  1145. Get
  1146. Return _Checked
  1147. End Get
  1148. Set(ByVal value As Boolean)
  1149. _Checked = value
  1150. InvalidateControls()
  1151. RaiseEvent CheckedChanged(Me)
  1152. Invalidate()
  1153. End Set
  1154. End Property
  1155. Protected Overrides Sub OnClick(ByVal e As EventArgs)
  1156. If Not _Checked Then Checked = True
  1157. MyBase.OnClick(e)
  1158. End Sub
  1159. Event CheckedChanged(ByVal sender As Object)
  1160. Protected Overrides Sub OnCreateControl()
  1161. MyBase.OnCreateControl()
  1162. InvalidateControls()
  1163. End Sub
  1164. Private Sub InvalidateControls()
  1165. If Not IsHandleCreated OrElse Not _Checked Then Return
  1166.  
  1167. For Each C As Control In Parent.Controls
  1168. If C IsNot Me AndAlso TypeOf C Is ReactorRadioButton Then
  1169. DirectCast(C, ReactorRadioButton).Checked = False
  1170. End If
  1171. Next
  1172. End Sub
  1173. #End Region
  1174.  
  1175. Sub New()
  1176. MyBase.New()
  1177. BackColor = Color.FromArgb(38, 38, 38)
  1178. ForeColor = Color.White
  1179. End Sub
  1180.  
  1181. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  1182. MyBase.OnPaint(e)
  1183. Dim G As Graphics = e.Graphics
  1184.  
  1185. Height = 16
  1186. G.Clear(BackColor)
  1187. G.SmoothingMode = SmoothingMode.HighQuality
  1188. R1 = New Rectangle(2, 0, 13, 13)
  1189. If _Checked Then
  1190. G1 = New LinearGradientBrush(R1, Color.FromArgb(220, 209, 68, 0), Color.FromArgb(220, 210, 75, 0), 90S)
  1191. Else
  1192. G1 = New LinearGradientBrush(R1, Color.FromArgb(24, 24, 24), Color.FromArgb(30, 30, 30), 90S)
  1193. End If
  1194. G.FillEllipse(G1, R1)
  1195. If State = MouseState.Over Then
  1196. R1 = New Rectangle(2, 0, 13, 13)
  1197. G.FillEllipse(New SolidBrush(Color.FromArgb(5, Color.White)), R1)
  1198. End If
  1199. If _Checked Then
  1200. R1 = New Rectangle(4, 1, 9, 6)
  1201. G1 = New LinearGradientBrush(R1, Color.FromArgb(80, 255, 255, 255), Color.FromArgb(30, 255, 255, 255), 90S)
  1202. G.FillEllipse(G1, R1)
  1203. G.DrawEllipse(New Pen(New SolidBrush(Color.FromArgb(225, 110, 30))), 3, 1, 11, 11)
  1204. End If
  1205. G.DrawString(Text, Font, New SolidBrush(ForeColor), 18, 1)
  1206. G.DrawEllipse(Pens.Black, 2, 0, 13, 13)
  1207. G.DrawEllipse(New Pen(Color.FromArgb(15, Color.White)), 1, -1, 15, 15)
  1208. End Sub
  1209.  
  1210. End Class
  1211.  
  1212.  
  1213. '--------------------- [ GroupBox ] --------------------
  1214. 'Creator: oVERT3Xo
  1215. 'Site: **********.net
  1216. 'Contact: oVERT3Xo@hotmail.com
  1217. 'Created: 11/22/2011
  1218. 'Changed: 11/23/2011
  1219. '-------------------- [ /GroupBox ] ---------------------
  1220. Public Class ReactorGroupBox : Inherits ContainerControl
  1221. #Region " Control Help - Properties & Flicker Control"
  1222. Protected Overrides Sub OnPaintBackground(ByVal pevent As System.Windows.Forms.PaintEventArgs)
  1223. End Sub
  1224. Protected Overrides Sub OnTextChanged(ByVal e As System.EventArgs)
  1225. MyBase.OnTextChanged(e)
  1226. Invalidate()
  1227. End Sub
  1228. #End Region
  1229.  
  1230. Sub New()
  1231. MyBase.New()
  1232. BackColor = Color.FromArgb(33, 33, 33)
  1233. End Sub
  1234.  
  1235. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  1236. MyBase.OnPaint(e)
  1237. Dim G As Graphics = e.Graphics
  1238.  
  1239. G.Clear(BackColor)
  1240. G.SmoothingMode = SmoothingMode.HighQuality
  1241.  
  1242. Dim DrawGradientBrush2 As New LinearGradientBrush(New Rectangle(0, 0, Width, 24), Color.FromArgb(10, 10, 10), Color.FromArgb(50, 50, 50), 90S)
  1243.  
  1244. G.FillRectangle(DrawGradientBrush2, New Rectangle(0, 0, Width, 24))
  1245. Dim gloss As New LinearGradientBrush(New Rectangle(0, 0, Width, 12), Color.FromArgb(60, Color.White), Color.FromArgb(20, Color.White), 90S)
  1246. G.FillRectangle(gloss, New Rectangle(0, 0, Width, 12))
  1247. G.DrawLine(Pens.Black, 0, 24, Width, 24)
  1248.  
  1249. G.DrawRectangle((New Pen(New SolidBrush(Color.Black))), New Rectangle(1, 1, Width - 3, Height - 3))
  1250. G.DrawRectangle((New Pen(New SolidBrush(Color.FromArgb(70, 70, 70)))), New Rectangle(0, 0, Width - 1, Height - 1))
  1251. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, Width, 0)
  1252. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), 0, 0, 0, Height)
  1253. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(45, 45, 45))), Width - 1, 0, Width - 1, Height)
  1254. G.DrawLine(New Pen(New SolidBrush(Color.FromArgb(31, 31, 31))), 2, 2, Width - 3, 2)
  1255.  
  1256. G.DrawString(Text, Font, Brushes.Black, Width / 2 - (3 * Text.Length) + 1, 6)
  1257. G.DrawString(Text, Font, Brushes.White, Width / 2 - (3 * Text.Length) + 1, 7)
  1258. End Sub
  1259. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement