|
Or have you tried saving the excel file as a csv file, then parsing its contents into the DataGridView control? (Using the Split could be a start)
Lloyd J. Atkinson
|
|
|
|
|
Hi..
Entry Level Prog in .net...
Now im doing project in billing software..
i want to secure my project..
i got USB id and Cpu id from client machine..
when i insert my USB(Pen drive) in my client..
At the time CPU id ill be "insert into USB permanently"...
i need solution for how to insert some datas or cpu id in usb....
Once insert key doesnt change when insert another system.. so easily protect my project....
Thx in Advance
By
Kannan.c
|
|
|
|
|
All you can do is to create a file on the stick and read/write the file. Hardly secure. There are hardware solutions out there that will do this, and without a file, but they are rather expensive.
|
|
|
|
|
Hi,
seems like most if not all USB memory sticks contain a unique ID, which you can obtain using WMI and Win32_DiskDrive (even as a regular user on Vista, as opposed to a hard disk's serial number). So I see two possible schemes where your software only runs with the stick present:
1.
have the USB serial number hardcoded in your app; have it contain code to retrieve and compare the serial number, and exit when no match is found.
Pro: simple
Con: the exe needs personalization
2.
instead of hardcoding it, have it stored in an encrypted way in a license file somewhere (could even be on the USB stick, does not matter); now have your app retrieve the hardware's serial number, and retrieve and decrypt the file, and compare both.
Pro: all customers can use the same exe
Con: you somehow must create and deliver the license files to your customers
Remark: for .NET apps, you still need some obfuscation, otherwise it is rather easy to patch a new serial number in there, and/or reverse engineer the encryption/decryption stuff.
|
|
|
|
|
Hi.. thx for reply..
i got USB unique id and cpu id.. But i need only how to send datas(CPU id) into USB....
|
|
|
|
|
You don't send data "into USB". You talk to the device attached to it directly.
|
|
|
|
|
|
You buy a book, you work through the book and learn how to code. You then get another book on application design and read and understand that.
In a couple of weeks when you have a coding problem and have learnt enough not to ask silly questions you come back and we will help you learn.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
ok...
it looks silly to u but i don have time,,,
i can do it with simple database but i want to know how to do it with sqlmembershipprovider????
thanx
|
|
|
|
|
code_collector wrote: but i don have time
So... it's urgent? Why didn't you tell?
|
|
|
|
|
If this is homework ask your teacher. If this is paid work, admit to the person paying that you're ripping them off. If this is for fun, choose something simpler and work up to this.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Well said.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
The following will hide a form in a nice fading fasion (like Vista)
Private Const AW_BLEND = &H80000 'Uses a fade effect. This flag can be used only if hwnd is a top-level window.
Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Int32, ByVal dwTime As Int32, ByVal dwFlags As Int32) As Boolean
Dim winHide As Integer = &H10000
Dim winBlend As Integer = &H80000
.........
.........
AnimateWindow(Me.Handle.ToInt32, CInt(1500), winHide Or winBlend) ' use in place of me.hide
Does anyone know how to have a form fade into view?
|
|
|
|
|
Me.Opacity ? You could then use a timer control to increment its value.
Lloyd J. Atkinson
|
|
|
|
|
The same function, AnimateWindow will fade a window into view as well.
Just remove the "winHide" constant from your function call, and it will assume you are trying to SHOW the window instead of HIDE it.
Please read the following function documentation from MSDN:
AnimateWindow Function
--------------------------------------------------------------------------------
The AnimateWindow function enables you to produce special effects when showing or hiding windows. There are four types of animation: roll, slide, collapse or expand, and alpha-blended fade.
Syntax
BOOL AnimateWindow( HWND hwnd,
DWORD dwTime,
DWORD dwFlags
);
Parameters
hwnd
[in] Handle to the window to animate. The calling thread must own this window.
dwTime
[in] Specifies how long it takes to play the animation, in milliseconds. Typically, an animation takes 200 milliseconds to play.
dwFlags
[in] Specifies the type of animation. This parameter can be one or more of the following values. Note that, by default, these flags take effect when showing a window. To take effect when hiding a window, use AW_HIDE and a logical OR operator with the appropriate flags.
AW_SLIDE
Uses slide animation. By default, roll animation is used. This flag is ignored when used with AW_CENTER.
AW_ACTIVATE
Activates the window. Do not use this value with AW_HIDE.
AW_BLEND
Uses a fade effect. This flag can be used only if hwnd is a top-level window.
AW_HIDE
Hides the window. By default, the window is shown.
AW_CENTER
Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used. The various direction flags have no effect.
AW_HOR_POSITIVE
Animates the window from left to right. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_HOR_NEGATIVE
Animates the window from right to left. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_VER_POSITIVE
Animates the window from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
AW_VER_NEGATIVE
Animates the window from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with AW_CENTER or AW_BLEND.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. The function will fail in the following situations:
If the window uses the window region. Windows XP: This does not cause the function to fail.
If the window is already visible and you are trying to show the window.
If the window is already hidden and you are trying to hide the window.
If there is no direction specified for the slide or roll animation.
When trying to animate a child window with AW_BLEND.
If the thread does not own the window. Note that, in this case, AnimateWindow fails but GetLastError returns ERROR_SUCCESS.
To get extended error information, call the GetLastError function.
Remarks
To show or hide a window without special effects, use ShowWindow.
When using slide or roll animation, you must specify the direction. It can be either AW_HOR_POSITIVE, AW_HOR_NEGATIVE, AW_VER_POSITIVE, or AW_VER_NEGATIVE.
You can combine AW_HOR_POSITIVE or AW_HOR_NEGATIVE with AW_VER_POSITIVE or AW_VER_NEGATIVE to animate a window diagonally.
The window procedures for the window and its child windows should handle any WM_PRINT or WM_PRINTCLIENT messages. Dialog boxes, controls, and common controls already handle WM_PRINTCLIENT. The default window procedure already handles WM_PRINT.
If a child window is displayed partially clipped, when it is animated it will have holes where it is clipped.
AnimateWindow supports RTL windows.
Avoid animating a window that has a drop shadow because it produces visually distracting, jerky animations.
|
|
|
|
|
Hi,
I don have a code to open an existing excel spreadsheet.The Excel is in C: Drive. Can anyone help me out???
Thanks in advance
Regards,
Samson
|
|
|
|
|
This question is asked at least once EVERY day. Will you please do SEARCH of either this site or Google before asking this question, there are 1000s of excellent responses out there already.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
samsonx wrote: Can anyone help me out???
Yes, there is one. And guess who? Its you. Help yourself by writing the code to open existing excel.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
Thank u for ur kind reply, i 'll follow it.
With Regards,
Samson
|
|
|
|
|
Hi! I have a project and I am a bit far when I feel really bad..
I have a form for commercial invoice where I retrieve the order from ms access and select some fields to upload in the form.
I have done that preety nice, but what I wanted to know is.., How can I make a print out using datareport... as well as the print preview. (or if there is any more idea in orinting)
I would appreciate any comments, suggestions or idea.
Thanks
Fernan
|
|
|
|
|
You can use datagrid control it is best. you already told ur access the data into form then you can retrieve the data from that form.
Datagrid nature.
first know which section ur woking.
What ever control ur drag and drop from control list it will act as control array and you can access same Ex: if 1st use the line control then it is become control(0).
I think it is useful.
|
|
|
|
|
Hi! thanks for your reply. Are you asking me to use datagrid control in printing? i am afraid i cant use that because I tried to use a vbfrom in printing but that would not give me enough space to print all the data I need. VB forms are not big enough tso I am looking for another way in printing.
Thanks anyway
|
|
|
|
|
k. try this one.
What ever accessing data into form take into the datareport using control then print it this easy ways do it.
|
|
|
|
|
yes that is right. I just get the value of the textbox in the form and link it to my datareport.
thanks for the idea..
Can I make a print preview using datareport? Or do you have an idea of any advance technique in print preview using visual basic.
|
|
|
|
|
no best concept is datareport. you can use form as print preview but problem is form can't expand upto A4. The form can use to A5 sheets.
If you have only text you can use Rich text box and u can align but that is too difficult but u can try it.
|
|
|
|