|
You will have to describe in more detail on "not working", what happened, which line of code causing error, any error message. Without know what are the inputs, and what your functions (isauthenticated, userexists) doing, nobody can help you.
You should first do a debug by tracing how the code flow. If you can't do that (due to not able to use debugger), you can print out the values and look at why it doesn't work according to your intention.
There's no such thing as "not working". It's either working, or not working as intended.
|
|
|
|
|
Hi. I have two winform one of them have region tranparency ("foreground" form); the other no ("backgroung" form). I want to move the background form and make the foreground form move with it. Any ideas?
Thanks a lot, Gonzalo.
|
|
|
|
|
Well, in the Move Event of the Background Form, add this code :
ForegroundForm.Location = BackgroundForm.Location
I haven't tested it though, but it should work.
Yuvi Panda T
Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
|
|
|
|
|
I will try it.
Thanks a lot Yuvi.
|
|
|
|
|
Hello DotNet group,
I have a general question in regard to running an insert command using a sqlDataSource.
I have a gridview that displays things that can be inserted into my database.
I now can select an item from the gridview (just one), and run the insert.
But, I might want the user to select multiple items in the gridview, and then perform an insert of these items (like 2 or 3 or whatever). I have a button to click when it is time to do the insert, the insert does not happen when the user clicks the "select" button in the gridview. What would be a good way to handle performing the insert on multiple items?
My first thought would be to create an array (in the code-behind page) that would hold the items to insert (in this case single integers), and set up a loop that reads the array values, and runs an insert for each item.
Any other ideas will help.
Thanks,
eric
Thanks for the information!
eric
|
|
|
|
|
I have developed a SmartDeviceApplication in Visual Studio 2003 that connects to a SQL database. It works when it runs in the Visual Studio pocket pc emulator but when I try to run it on the pda itself an error occurs when it trys to connect to the database. The error reads:
SmartDeviceApplication1.exe TypeLoadException
Application::run+0xf
Form1::Main+0xa
I'm wondering if it errors because I need to install sql server ce on the pda? And if it needs to be installed, how do I do it? Or is there something else I need to do? Please help!
Thanks for any help you can provide.
|
|
|
|
|
Hello there,
I have a Requirement class. I wanted to instantiate a number of objects of the same class. So I created a array of Requirement object. Here is what I had:
<br />
dim req() as Requirements<br />
<br />
Private sub CreateRequirements(num as Integer)<br />
for i as integer=0 to num<br />
req(i) = new Requirements<br />
next<br />
<br />
end sub<br />
Above code gives an error like "Object reference not set to an instance of an object". Can someone help me out?
Thank you,
Bashar Amin
Sr. Software Engineer
|
|
|
|
|
You should Redim the array first:
dim req() as Requirements
Private sub CreateRequirements(num as Integer)
Redim req(num) as Requirements
for i as integer=0 to num
req(i) = new Requirements
next
end sub
|
|
|
|
|
Thank you. It solves the problem but does not need "as Requirements" for the Redim statement.
I have another question. If you do not know the size at a time and I want to create the Requirement object dynamicly, do I need the Redim statement?
Bashar Amin
Sr. Software Engineer
|
|
|
|
|
Just curious: Do you have a hard reason why you need to use an array as opposed to an arraylist?
It would handle all the resizing issues for you and, if needed, you can always generate an array from the ArrayList using ToArray().
Q.
|
|
|
|
|
This statement:
dim req() as Requirements
only declares a reference to an array of type Requirements. It doesn't instantiate it.
You need to initialize the reference to an instance of an array of that type before you can start assigning values to it.
Will
|
|
|
|
|
Hello there,
I am trying to perse a word document by reading the style property of each paragraphs. Here is what I have so far:
<br />
dim myDoc as new Document<br />
dim pp as Paragraph<br />
dim str as String<br />
<br />
myDoc = CType(GetObject("test.doc"), Document)<br />
for each kk in myDoc.Paragraphs<br />
if Mid(kk.Style.ToString(),1,12) = "requirement" Then<br />
str = kk.Range.Text<br />
SaveData(str)<br />
end if<br />
next kk<br />
"requirement" is a name of style I have created in the test document. In short how I can read the stylename for the paragraph? Can anyone please let me know what is wrong with this code.
Bashar Amin
Sr. Software Engineer
-- modified at 16:15 Thursday 20th April, 2006
|
|
|
|
|
I've created a PrintDocument and have used PrintPreviewDialog as I'm designing it to preview the document... The PrintPreviewDialog appears EXACTLY how I want it to print, but when I print the document it shifts every item on every page to the right. It seems to increase the left margin.
Any suggestions on where too look or what to do?
Thanks,
Andrew
-- modified at 11:41 Thursday 20th April, 2006
|
|
|
|
|
Hi all,
I need to parse the file below. Its a text file and i need to extract the following from it. I am doing programming in VB.Net.
1. Date
2. Remittence date
3. name i.e. malkatam airlines and sheker air
4. SS code
5. Amounts payable or recievable of all records
6. Total
By all records i mean every line under the columns of name/city, cass code etc.
I need to solve this problem urgently. Any help would be appreciated.
Cheers
Saad
Manahil ACCOUNTS SETTLEMENT SYSTEM - IMPORT HINGE ACCOUNT PLANNING LIST - DELIVERING COMPANIES DATE: 08-MAR-06
** AMOUNTS PAYABLE - TO DELIVERING COMPANIES** PAGE: 1
CASS-SETTLEMENT OFFICE : GB UNITED KINGDOM REMITTING PERIOD: 2006/01
COUNTRY: GB UNITED KINGDOM NAME : CYC 01 CURRENCY: GBP REMITTANCE DATE : 15-MAR-06
NAME SS-CODE AMOUNT AMOUNT
PAYABLE RECEIVABLE
Mulk AIR 001/A GBP 100
Kalumpu
shekerir 014/A GBP 22
FAGGS
------ -----
TOTAL 122 0 .00
====== ======
Manahil ACCOUNTS SETTLEMENT SYSTEM - IMPORT HINGE ACCOUNT PLANNING LIST - RECIPIENTS DATE: 08-MAR-06
** AMOUNTS RECEIVABLE - FROM RECIPIENTS** PAGE: 1 Manahil-SETTLEMENT OFFICE : GB UNITED KINGDOM REMITTING PERIOD: 2006/01 COUNTRY: GB UNITED KINGDOM NAME : CYC 01 CURRENCY: GBP REMITTANCE DATE : 15-MAR-06
NAME / CITY SS-CODE AMOUNT AMOUNT
PAYABLE RECEIVABLE
gvg freight GB-00001/0001 GBP 22
ok Slough
WEST LTD. GB-00003/0006 GBP 100
STANWELL
-------- ---- TOTAL 0.00 122
======= =====
saad
|
|
|
|
|
Hi.. any one please help me on this
I have two web forms... AllEntries.aspx and Update.aspx
I am using ASP.NET with VB.NET
AllEntries.aspx has a datagrid in which all columns are bound and editing entry is also there.
What i need to do is , when i click on Edit for the particular entry, page will be redirected to Update.aspx page.
Update.aspx page is kind of form where all textboxes and dropdown lists are there. So when i click on edit i want all the fields to be filled up taking the data from the database. i m using SQL server 2000 as back-end
Can any1 help me on this as i am not able to get all the textboxes filled with the entries in databse for that particular userin the datagrid.
Do we need to inherit the datagrid control in Update class and use datagrid's functionality? Datagrid is in AllEntries.aspx and i want to use it in Update.aspx. If Yes, then how?
-Thanx a lot
Harsh
|
|
|
|
|
Im not xactly a gig, so I need help with this code.A code for a scanner that will read information from an access card and send a notice to a server computer, I need all the help I can get on this one.Please help.:->
kagiso
|
|
|
|
|
Scanners manufacturers tend to ship an API with their hardware, that allows you to get some sort of event when a scan has taken place, so first port of call is to speak to the manufacturer of your scanner.
In order to help you with some code, you need to be more specific...there is no such thing as a generic "send message to a server computer" - you need to be more specific with your needs.
You will also find people much more receptive to giving you help if you have at least tried to write some code yourself.... very unlikely you'll get full working code on a forum.
|
|
|
|
|
I am trying to run this in VB.net(2001)
ii = " C:\Documents and Settings\HP_Owner\My Pictures\gearsho.jpg"
ShowMyImage(ii, 792, 698)
and I get this error message
************** Exception Text **************
System.NotSupportedException: The given path's format is not supported.
at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
at System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOAccess.AddExpressions(String[] value, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path)
at System.Drawing.IntSecurity.DemandReadFileIO(String fileName)
at System.Drawing.Bitmap..ctor(String filename)
at CVICENI.Form1.ShowMyImage(String fileToDisplay, Int32 xSize, Int32 ySize) in C:\Documents and Settings\HP_Owner\My Documents\Visual Studio Projects\CVICENI\Form1.vb:line 175
at CVICENI.Form1.Timer1_Tick(Object sender, EventArgs e) in C:\Documents and Settings\HP_Owner\My Documents\Visual Studio Projects\CVICENI\Form1.vb:line 160
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime)
I have no idea what it means. Same program runs easily .wav and .rtf files from same directory with same mode of path. If anybody can help I would really be thankfull.
P.S. On the same computer VB4 has no problem with this.
Thank you Jirka
|
|
|
|
|
Jirikub wrote: ii = " C:\Documents and Settings\HP_Owner\My Pictures\gearsho.jpg"
you have a space at the beginning of the path - not sure if this was a typo or the cause of the exception!
|
|
|
|
|
Stupid and blind old geezer, that's me. I was playing with this for half a day and it was simple space.
Thank you for saving my sanity or what's left of it.
Jirka
|
|
|
|
|
No problem, but its weird because I tried to replicate the error by providing a File.Open command with a path beginning with a space and no error occured...maybe you're on .NET 2.0 and that is a new "feature".
Glad you got it sorted.
|
|
|
|
|
Hi all,
I have implemented Uploading and downloading data though serial communication. During the time of Uploading/Downloading there will be continuous exchange of data. Hence any other action on my GUI during Upload or Download operation will not be allowed (like Minimising/Maximising the form and Exitibng from the form).The GUI will hang untill the operation is complete. So to make the GUI flexible for the user i have used DoEvents in my program which will be called at some particular locations. This solved my problem. But i heard that using DoEvent may result in some problem. As the DoEvents performs all the events which are pending in the windows message queue, it may hang my application if there is an event which consumes lot of time.Please someone help me with solving this problem
Thanks in Advance,
Sushma
|
|
|
|
|
To keep the GUI responsive while executing a long-running task you should execute that task in its own thread.
This can be done manually, using the Thread class, using the ThreadPool (in .NET 1.x) or the BackgroundWorker (.NET 2.x)
|
|
|
|
|
Thank you very much for your response. I cannot go for .Net. I must implement it only in VB. Can you give me more details on how to make the GUI responsive while running a long task.
Thanx and Regards,
Sushma
|
|
|
|
|
can anyone tell me theupdate command that i can use at button_click event in VB.NET so that i can update data in datagrid and show the updated data in related EXCEL sheet.
|
|
|
|