|
Hi,how i can to transform
System.Drawing.Color -> System.UInt32 and backward.
System.UInt32 is value which contain OLE_COLOR data.
THANK
|
|
|
|
|
You might want to check out the handy System.Drawing.ColorTranslator class. Among a couple of other things, it has a "ToOle" method that takes a Color and returns an Integer.
Scott McMaster
|
|
|
|
|
i am filling my dataset and trying to show the record in the report but it's not showing i've checked the datset it's filled with records and to show it on report this is what i am doing
CrystalReport.SetDataSource(OleDataset)
CrystalReportViewer.ReportSource = CrystalReport
help me on this one.thanx in advance
|
|
|
|
|
the basic steps for doing this are:
1. create new .xsd file to describe your datasource (dataset)
2. create new .rpt (crystal report) template using .xsd file as your datasource. you can actually create the report at run-time, but that's more of a headache than you want to get into unless it's absolutely necessary. (i.e. you don't know that formatting of the report at design-time etc.)
3. create, populate and display your report:
Dim dsMyData as Dataset
Dim crMyReport as ReportDocument
Try
'--- code to populate your dataset here ---'
crMyReport = New ReportDocument
crMyReport.Load("..\Templates\myReport.rpt")
crMyReport.SetDataSource(dsMyData)
me.CrystalReportViewer1.ReportSource = crMyReport
This technique works best with strongly typed dataset, but is feasible with generic datasets as well. sometimes i have problems synchronizing the definition of the dataset with the actual dataset in memory and the report will not show any data. If this happens and i absolutely need to use a generic dataset i usually take care of this by just generating my dataset and serializing the data and schema out to an xml file. Then use this file as the source for my report template.
sorry for any typos, i just wrote this code off the top of my head.
hope this helps,
-jim
|
|
|
|
|
Hi i need a code for a OutlookBar
|
|
|
|
|
Start with a search[^] of the web.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi there -
i want to do the following:
I have a class, call it clientView, that includes an imageBox and two labels. that imagebox and these two label i want to position like that:
IMAGEBOX
LABEL1
LABEL2
Now, in my main form, i have a hashtable that includes several clientView objects.
i want to position these clientView objects on my main Form like this (e.g. there are 3 objects of clientview in the hashtable):
IMAGEBOX1 IMAGEBOX2
LABEL1.1 LABEL2.1
LABEL1.2 LABEL2.2
IMAGEBOX3
LABEL3.1
LABEL3.2
now, because my hashtable is dynamic, if another object is added to it, i will call a function, that reorganises the view of the objects in my main Form. (e.g. number four was added):
IMAGEBOX1 IMAGEBOX2
LABEL1.1 LABEL2.1
LABEL1.2 LABEL2.2
IMAGEBOX3 IMAGEBOX4
LABEL3.1 LABEL4.1
LABEL3.2 LABEL4.2
maybe this is very easy, but i have no idea how to determine the right positions of my objects.
can anyone help me out of my mess???
thx for all helps.
greetings-
tom
|
|
|
|
|
tommy_tanaka wrote:
maybe this is very easy, but i have no idea how to determine the right positions of my objects.
can anyone help me out of my mess???
Actually, this is going to be some pretty complicated logic using very simple math.
First, one block of this data would be a good candidate for a custom control. Your control would be a single instance of the block of data you want to display, like ImageBox1, Label1, Label2. You wouldn't have to keep track of all the labels and image boxes, just the instance of the control that contains them.
Next, you'l have to do A LOT of planning and layout on paper. You'll need to know the dimensions of the client area (which can change!) that your going to display your control(s) in. You'll need to know the dimensions of your control(s), the spacing between the edge of the client area and your controls, the spacing between your controls, how many controls your going to display, and most of all, what the layout rules are.
Then, and only then, can you start putting the logic together and laying out the math that will calculate the positions of your custom controls.
It's not really that hard. It's just tedious and planning intensive.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok. sound not quiet difficult ... but i never created a custom control... but i think this will not be a big thing. can another class also be part of my custom control?
best i try to tell you what i'm doing:
i implemented a client-server application, where serveral clients send their screenshot to the server. the server keeps the shots of the clients, the pc and username in a class named "client".
and now i want to dislpay the screens of all the logged in clients, and also the name and the username (therefore: 1 imagebox and 2 labels). of course, the amount of the clients can be variable, depending how many clients are logged in.
so if a new client logs in, i create one of my custom control and if possible give it the client object in the constructor. and in the control itself, it gets the picture and text for the labels by the client-object.
if i fix the size of my mainForm, i think, this would be easier for me concerning positioning my controls...
|
|
|
|
|
tommy_tanaka wrote:
i implemented a client-server application, where serveral clients send their screenshot to the server. the server keeps the shots of the clients, the pc and username in a class named "client".
Beating the crap out of your network are you?
You could create an entire control that encapsulates just a single user session. That control would update itself, showing the username, machinename, and client image. For each incomming client commection, a new control is created that does all the work for that connection. Your main code would setup and manage the client area that shows the controls and places them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
so to say, i do, yes.
anyway, i am using the .Net Remoting technique and so, my client-objects are already finished an marshalByRef objects... and also i want to keep the gui-layer away from my network-layer. therefore, i don't want to mix the custom control and the client object. i had in mind to have a custom control like that (pseudocode):
Class clientControl
Private remoteclient As Client
Private ImageBox As ImageBox
Private Label1 As Label
Private Label2 As Label
Sub New(client)
clientControl = client
ImageBox.Image = clientControl.Image
Label1.Text = clientControl.Username
Label2.Text = clientControl.PCName
End Sub
End Class
My problem is: how to position this control, how to genereal create it??? and then, how to update the Imageboxes ...
|
|
|
|
|
Hi..
I want to know at run time whether a partcular file is accessible at run time.How can I do the same
Thanks and regards
g
|
|
|
|
|
The best way to do that is to try and open the file with the access you need. If it fails, then the file is inaccessible. You can do this insde a Try/Catch/Finally block to test this.
Try
Dim myFile As New FileStream( filename, FileMode.Open )
' More code to do whatever you need...
Catch
' The FileOpen failed so the file is not accessible.
Finally
myFile.Close()
End Try
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I use the ASP.Net? I currently have geocities as my web host, but It will not work with ASP.Net.
Any suggestions as with which web host i can use?
bravo659
|
|
|
|
|
Ok. Thanks. I got that MDI child creation. Now I have an integer variable named OpenWindows that i declared as Public in my frmMain class. What I need now is how do I change OpenWindows ' value from frmMain 's child - frmText when it's closing? The code below doesn't work:
Private Sub frmText_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing<br />
Dim blabla As New frmMain<br />
blabla.OpenWindows -= 1<br />
End Sub
|
|
|
|
|
Not sure about your specific problem, or the wisdom of your approach, but to get to base class methods, use base.
At least, that's now C# works.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
To add to what Christian said, the word your looking for is MyBase . This will allow you access the base class members.
MyBase.baseClassMethod()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have as a homework this exercise:
Description of the program:
1. Necessary to develop MDI-application, which gives a chance user to execute operations with object of the file system:
- produce navigation (transition from file in file, change the disk),
- realize copying, removing, renaming of the files and files.
2. The Affiliated window given applications is a window with list of the files and files any directory. The Operations with element of the file system in this window possible to execute by means of menu or softkeys.
3. As in majority standard MDI-applications necessary to realize the operations in menu Window: displacement between window and sequencing the windows.
I need some free code about that.Please help me cause my deadlines is almost over
|
|
|
|
|
No, we will not help write your homework assignment. How else will you learn anything?
You should have all the materials necessary to work out how to do this task from your tutor. If you have a problem or don't fully understand a specific part of the assignment then we can help with that.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
endri81 wrote:
I need some free code about that.
I'm sure you do. OR you could actually do your own homework, so that you learn something. Or how were you expecting this stuff to work when you hit the real world, and your employer sets you a task ?
endri81 wrote:
Please help me cause my deadlines is almost over
And how have you spent the time since your project was set ? Or were you too drunk to remember ?
I am at a loss to understand why the internet seems overrun with deadbeats who think they can get through life without actually applying themselves to anything. It's VB for goodness sakes, my 8 year old could probably do your assignment.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
It is true without a doubt that if you want to learn how to code in any language, you need to do the work yourself. In school they give you all the necessary materials to work with, and all you learn are the fundamental coding in VB.Net, or other language. The coding part is the hardest. I find it to be. But, in the real world if you graduate and get hired as a programmer, and your boss gives you that given task and don't know how to create an MDI Parent and a child form, then you will not last not even one day. It's good to get feed back and study the code and make sure you learned something.
bravo659
|
|
|
|
|
Christian Graus wrote:
I am at a loss to understand why the internet seems overrun with deadbeats who think they can get through life without actually applying themselves to anything. It's VB for goodness sakes, my 8 year old could probably do your assignment.
Don't hold back now.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Hello,
I make a small project in Vb.NET, i use RICH EDIT BOX to display text.
There is a "Print" button in my application.I want that when user clicks on "PRINT" button, then a print dialog appears (JUST as it appears IN NOTEPAD or MS-WORD when user clicks on "PRINT" button) and ask for Printing options i.e. " PRint Current PAge", "PAge No" etc
Kindly help me in this regard.
EsHbAn BaHaDuR
|
|
|
|
|
Look up PrintDialog on the VS.NET help or MSDN if you don't have the documentation on your machine. I doubt that this will have all the features of the MS-Word print dialog (which is more advanced). Also, I believe that you have to do more work to actually print anything. I am not sure about how to do that right now, sorry.
vir·tu·al re·al·i·ty
n. Abbr. VR
A computer simulation of a real or imaginary universe in which Microsoft APIs are thoroughly documented and behave in an entirely logical manner.
|
|
|
|
|
Actually the print is complex, but also as easy it comes. Depends what you really want to do with the print option. Like he said, in MS Word is more advanced and complex. It has a lot of coding using the Do..Loop, IF..Then...Else statements, as well as the With conditions for every loop that a counter encounters when a user clicks on the print button.
But there is a very simple code that you may use momentarily, just to get the gist of coding print documents.
This is the code that I developed that is much easier if I want to print non-complex applications. I used this to print the database information that fills the dataset in a datagrid. The connection I used is Access Database(Microsoft Jet) and the OleDbDataAdapter. It prints fine without exception.
All you need is a print button. Call it printGrid.
Private Sub btnPrintGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintGrid.Click
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles _
PrintDocument1.PrintPage
Dim myPaintArgs As New PaintEventArgs(e.Graphics, New Rectangle(New _
Point(0, 0), Me.Size))
Me.InvokePaint(DataGrid1, myPaintArgs)
End Sub
bravo659
|
|
|
|
|