|
Don't worry , be happy!
hey dont get mad, i respect your opinion and help!
|
|
|
|
|
Hello everyone,
I currently have an infragistics ultrawingrid that takes input in a cell and when tabbed, it updates database and refreshes the grid but the tab goes to the next control. I need the tab to go to the next cell. This is not a problem in the designer its a problem with the grid being refreshed in the hard code and it has to be refreshed because other values have dependency on the values being entered. does anyone have any ideas or any reference to how i can achieve this.
Any comment or suggestion is appreciated
|
|
|
|
|
A better place to ask this question is here[^].
|
|
|
|
|
Hi,
How can I find out what type of disc is in the dvd/cd reader.
I found
- System.IO.DriveInfo(driveLetter)
- FileSystemobject with drives
- Directory.GetLogicalDrives
But non of these tells me what type of disc is in the machine. How can I find this?
Jan
|
|
|
|
|
I don't think there's a direct property but System.IO.DriveInfo has Totalsize so you could work it out from that, no?
|
|
|
|
|
|
Press eject
|
|
|
|
|
you can do that by a simple P/Invoke:
mciSendStringA("set CDAudio door open", "", 0, 0)
and that also works for data CD and DVD
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
How do you make an input that the user key in a textbox to be a percentage number?
|
|
|
|
|
Ummmm, Divide (/) by 100
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Just make it a number and put a label with "%" in it behind.
Then on change parse the value to %
Easier than messing around with controlling inputs.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Use a NumericUpDown with the max/min set to 100/0, and a label next to it for the % sign.
|
|
|
|
|
Hello Everybody,
I am trying to print the Image which have the text. It printing properly. But in Text Portion Displays some distervence in printing.
Thanks
If you can think then I Can.
|
|
|
|
|
Sorry, but i haven't got a clue what you are talking about, it doesn't make alot of sense.
Can you maybe reword it.....
|
|
|
|
|
I am Creating an Image by using Text. It is showing fine. But I am Trying to print this Image then the Text Quality is not Fine.
Code Is simple
g.DrawImage(this.Ibarcode , DrawRectangle)
If you can think then I Can.
|
|
|
|
|
It's hard to say without being able to see what the image looks like when it is printed. It could be some scaling problem or resolution problem.
You could perhaps try sending the image and the text to the printer separately instead of writing the text on the image?!?!
|
|
|
|
|
But my requirement is crating image by using text. then it's depend on user to print or Export in Image.
If you can think then I Can.
|
|
|
|
|
i am trying to convert c# to vb.net of this project!
.NET TWAIN image scanner[^]
i did it and it works on select source, and scan preview but not when i click scan then it throws me error "Arithmetic operation resulted in an overflow." in winmsga.x = CShort(pos)
much of code!
here is what i have done:
TwainLib[^]
Twain[^]
GDIPlusLib[^]
And my form[^]
only two things got errors when i converted code!
first one is:
<StructLayout(LayoutKind.Sequential, Pack:=4)> _
Friend Structure WINMSG
Public hwnd As IntPtr
Public message As Integer
Public wParam As IntPtr
Public lParam As IntPtr
Public time As Integer
Public x As Integer
Public y As Integer
End Structure
and
Private winmsg As WINMSG
so i just renamed it to winmsga maybe i did something wrong here?
and other error was:
Protected Function GetPixelInfo(ByVal bmpptr As IntPtr) As IntPtr
bmi = New BITMAPINFOHEADER()
Marshal.PtrToStructure(bmpptr, bmi)
bmprect.X = InlineAssignHelper(bmprect.Y, 0)
bmprect.Width = bmi.biWidth
bmprect.Height = bmi.biHeight
If bmi.biSizeImage = 0 Then
bmi.biSizeImage = ((((bmi.biWidth * bmi.biBitCount) + 31) And Not 31) >> 3) * bmi.biHeight
End If
Dim p As Integer = bmi.biClrUsed
If (p = 0) AndAlso (bmi.biBitCount <= 8) Then
p = 1 << bmi.biBitCount
End If
p = (p * 4) + bmi.biSize + CInt(bmpptr)
Return New (p,IntPtr) 'so i made like this (Return New System.IntPtr(p))
End Function
can annyone help?
thanks!
|
|
|
|
|
ahhhh i hate this! :P
i made it work!
thanks anyway
|
|
|
|
|
You should be chuffed you got it working. It also shows the guys on CP that you are willing to work at it yourself, and so will be much more willing to help in the future. Congrats
|
|
|
|
|
thanks! :P
btw i forgot to post a solution!
the only thing why it wasnt working was this part:
winmsga.hwnd = m.HWnd
winmsga.message = m.Msg
winmsga.wParam = m.WParam
winmsga.lParam = m.LParam
winmsga.time = GetMessageTime()
winmsga.x = pos 'just removed CShort()
winmsga.y = (pos >> 16) 'same here
|
|
|
|
|
Please tell me there is a better way to make a pacman like shape move across my form...
Public Class Form1
Dim formSurface As Graphics = Me.CreateGraphics
Dim intLoop As Integer = 0
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
tmrMove.Enabled = True
End Sub
Private Sub tmrMove_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrMove.Tick
formSurface.Clear(Color.Black)
Select Case intLoop
Case 0
formSurface.DrawImage(My.Resources.pacmanopen, 10, 75)
Case 1
formSurface.DrawImage(My.Resources.pacmanopen, 11, 75)
Case 2
formSurface.DrawImage(My.Resources.pacmanopen, 12, 75)
Case 3
formSurface.DrawImage(My.Resources.pacmanopen, 13, 75)
Case 4
formSurface.DrawImage(My.Resources.pacmanopen, 14, 75)
Case 5
formSurface.DrawImage(My.Resources.pacmanopen, 15, 75)
End Select
intLoop += 1
End Sub
End Class
Could I possibly do something like...
Case 0 to 100
formSurface.DrawImage(My.Resources.pacmanopen, intX, 75)
and then add 1 to intX each time? I'm open to any ideas...
|
|
|
|
|
yes, you should keep your shape's location in some variable(s). And paint only in the Paint handler.
This article[^] will give you the principles and an example; it is a C# example, but that only constitutes a different syntax, it does not affect the principles.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Alright thanks I'll go look at it right now. I knew there was an easier way..
|
|
|
|
|
The whole approach of using winforms is doomed to failure. You should use XNA, or perhaps WPF, something DirectX based.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|