|
the control crashes the visual studio i mean studio closes using this control automatically.
any idea to remove this bug. ??? i need to add 25 text elements to be marqueed using this control but i m unable to do this. NEED HELP
|
|
|
|
|
OK, the best place to ask is at the bottom of that article. I've never seen this guy's control, nor used it. And frankly, with a 9 month old scurrying around the house, I really don't have the time to dig into his control to see how it works.
|
|
|
|
|
Hi, I am new to this forum and also new to VB.
I was looking for a way to create a Gantt Chart type calender view, and I have seen the article posted on this page by Jean Marc[^]
However I need to create a calendar in VB and was wondering if it was possible to either customize the MonthCalendar view of Visual Studio 2005 or maybe to use a DataGridView? The calendar should be linked to the system calendar and ideally show a time span of over three years. Each day should be one column, and I intend to drag & drop boxes (events) into the grid.
What would be the preferred way to develop such a calendar? And is there a possibility to post a screenshot in this thread, because I actually have a visual guideline which I could post.
Thanks for any advice,
pagapau
|
|
|
|
|
hello ,
i am using a combobox which is bound to a dataset with a bindingsource
i have set the displayMember to one of the dataset columns ,
what i want to do is add some additional text to the elements displayed text in the combobox ,
for example to the first element i would like to add '1'
and to the 2nd element '2' ....
any idea how i might do that ?
thank you very much in advance!
Net
|
|
|
|
|
Add the information into the dataset before binding. You cannot do this via the combo, you need to manipulate the underlying data.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
there is no toString() method that i could override to get that results? ,
altering the data seems a bit extreme for this task and the problem is the selected element in the combobox is also bound to some other text box that i would like to stay as it is.
Net
|
|
|
|
|
You're problem is that the combo does not control the data, that is completely at the mercy of the underlying dataset. You could add another field to the dataset purely for combo display, bind the display member to the combo field and the textbox the the original field.
What you are not going to be able to do is fiddle with the data via the combo control.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am using visual C++ and i cannot get my text to move to the next line with using "ENDL" is there another command i can use. i am just a beginner programmer.
|
|
|
|
|
If you ask in the C++ Forum I'm sure you will get an answer.
I don't speak Illidiot - please talk slowly and clearly
|
|
|
|
|
keanue wrote: I am using visual C++
Then may I suggest that you use the C++[^] forum?
|
|
|
|
|
keanue wrote: and i cannot get my text to move to the next line with using "ENDL
Where are you printing the text? On a console? If yes, std::endl will work. Also, this is wrong forum. Move to C++/MFC forum.
|
|
|
|
|
Hello,
I am trying to create a basic application just for testing purposes. What the application needs to do is to have a tab control on the main form and each tab to display contents. Now, what I want is that the control that appears on each tab page to run in a separate process.
Like for example, having a webbrowser control displayed in a tab page but the control itself which is part of a different class, to be running in a different process than the ui thread. The control that is running in a different process still needs to communicate with the main thread.
Can you please advise if this is possible? If so, what should the main points to cover in order to achieve this?
Thanks for your help.
|
|
|
|
|
No, that is not possible. You can do work in several threads, but anything that has to do with the user interface is done by the main thread.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I think you're using the wrong terminalogy. Doing this in a "seperate process" is not possible. That would be in an entirely different AppDomain, or a seperate .EXE, or some other compartmentalized process that has no direct access to your current app.
You cannot run the webbrowser control on anything other than your app's UI thread.
|
|
|
|
|
All code that draws to the UI in a particular window must be in a single thread. Even MDI child windows must be drawn by the same thread as the parent (a restriction I would think wouldn't be necessary if the system were could force thread synchronization when, and only when, a child window changes dimension). If you want to create the appearance of having things done by different threads, you need to have a UI thread that avoids doing anything that will take much time, and then have other threads supply information to the UI thread. As an example (not the best approach, but a workable one) you could allocate three bitmaps for one of your tabs. At any given moment, one may be in use by the UI thread (copying data from it to the screen), one may be 'ready' for the UI thread to grab at its convenience, and one will be in use by the helper thread to draw the next screen. When the helper thread finishes drawing a bitmap, it tells the UI thread to display it (using BeginInvoke if there isn't already a request pending). If there was a bitmap pending for display but the UI thread hasn't started showing it yet, the helper thread can take it back (since the UI should show the newer bitmap). Otherwise the helper thread can reclaim the previous bitmap the UI thread displayed (since the UI thread is done with it).
I'm not sure of the best way to handle the thread synchronization, but an easy way would be to recognize that there are twelve possible bitmap states (the drawing tread can hold any of three bitmaps and the UI thread one of the remaining two, and the remaining bitmap may or may not have data that should be displayed). The state can easily be held in an integer, and Threading.Interlocked.CompareExchange used to handle state updates in thread-safe fashion.
This approach would not be the best for fast and frequent display updates (since the whole tab would have to be redrawn for every update) but it would be a simple way to provide essentially total separation of the two threads.
|
|
|
|
|
Hi,
What I need to be able to do is to set the top and bottom of the range displayed on the graph to 32,500 and -32,500 and plot values within this range, even if they are of the order +100 to -1000 say. I have tried Scale.Max and Scale.MaxGrace but neither of these appear to FIX the top and bottom values. Does anyone know if there is a way to do that?
|
|
|
|
|
I am trying to solve a problem of selecting the best students for admission to different programmes in a school, based on their weight scores but I get a brain jam because i think the logic is quite complex. the rules are that :
1. each student is allowed to have 6 choices of programmes
2. their weights are calculated for each programme
3. each programme has a predetermined number of students for in-take
4. a student qualifies for a programme in the order of the choices made as long as he ranks within the number of students required for the programme for example (a) if a student qualifies for 3 programmes of his choice, he is given the one closest to his first choice, and (b)if a student qualifies for his last choice he is admitted
Please help!
Gideon
|
|
|
|
|
Sounds straightforward to me. Calculate the weights for all students who request a specific program, and choose the top xx, where xx is the number allowed.
Is this homework, or paid work ? If it's homework, you should talk to the teacher. If it's paid work, and you have no idea how to do it, you really should offer a refund.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanx Graus so far but what you are saying is the first impression. remember that students have up to six choices and a student has to be admitted for only one programme and so your suggestion suffers from the result having students short-listed for more than one programme.
i am proposing to develope this program for my research at school. it is not paid work. I can do the code for calculating the weight
Christian Graus wrote: Sounds straightforward to me. Calculate the weights for all students who request a specific program, and choose the top xx, where xx is the number allowed.
Is this homework, or paid work ? If it's homework, you should talk to the teacher. If it's paid work, and you have no idea how to do it, you really should offer a refund.
s and all. the problem is this logic am inquiring about
|
|
|
|
|
Gideon W. Wananda wrote: remember that students have up to six choices and a student has to be admitted for only one programme
Add a List<> to your application. Dump the students ID into that list once he/she enrolls in a "programme".
You can use the students' preferred programme whilst there is room
I are troll
|
|
|
|
|
Before I go crazy on this I was wondering if somebody could point me in the right direction
I was trying to use a structure to store "datasets"
Anyway: Creating / populating the structure seems straight forward
Public Structure Test_Structure
Public Name As String
Public MapTo As String
Public Description As String
'......
'....
End Structure
Dim TEST(10) as Test_Structure
Test(0).Name = "FirstName"
Test(1).Name= "SecondName
But How do I now search / get the index for the Dataset containing the .name "FirstName"
Should I use a Hashtable to store the index ????
Thanks
georg
|
|
|
|
|
You would use foreach to iterate over your array and check each item for the value you want.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Well if that's the "only" way, a Hashtable will be a lot faster
I just can not belive there is not another way of indexing a Structure .
One would think that indexing / searching is probabaly one of the most required tasks to be performe with a structure - But I might be wrong
Georg
|
|
|
|
|
Well a structure doesn't automatically build indexes into all it's data, imagine how wasteful that would be if it did that even when not required. Yes, a hashtable would be faster.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
First of all, you should not use a structure for this, you should use a class. A structure should not be larger than 16 bytes, and you break this if you have more than four string references. Also structures are tricker than classes to implement correctly.
If you want a fast lookup for a field you can create a Dictionary with the field as key and the object as value.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|