I have a WPF window appliaction that I would like to build the functionality to have a dynamic style (font family, weight, size, etc) that is stored in a SQL database allowing a user to specify the type of style to use on control's such as ListView's and labels, etcI have started defining styles in the Application.XAML file and am not sure if this is the best approach to achieve a dynamic style.
I'm trying to create an array of checkboxes dynamically and also want to put event to those checkboxes. For example: I have a array of checkboxes - Chk1, Chk2. I want it to work this way: When I check Chk1, I want to disable Chk2, and when Chk1 is unchecked, Chk2 is enable, and vice versa.
it seems that adding for example a button Dim myButton as New Button and then addHandler to mySub("lol", 255) is not possible. Where mySub is Shared Sub MySub(byRef myString as string, myInteger as Integer)
So: addHandler myButton.click, addressOf mySub("lol", 255) - returns an error saying it does not work with parentheses or whatever. I somehow see why this might not be possible, so I'm looking for a work-around on this problem.
I've done much research in how to turn off visual styles for a custom drawn control, and coming only close on how to do this.
The problem I am seeing is that Application.EnableVisualStyles affects a boolean which tells the control how it should paint itself. I don't have a problem with styles being enabled, but rather getting a button to be drawn without using the visual styles rendering function.
Public Class LookupButton Inherits Button #Region "Disable Themes"
Method 2 simply does not do anything, nor would I want to use it, since it calls unmanaged code.
Method 1 does the right thing for the button, disabling the theme, but of course it does way more than that causing the entire window/app to blink with/without visual styles. And even if this did work, I wouldn't use it because it effects the entire application.
We need visual styles enabled on progress bars, since marquee will be used on a few database calls.
The button has an image ontop of it which gets cut off by the visual styles rounded corners. And there are a few more controls which would be benificial to turn off visual styles as well.
If there is anyway to manipulate the ButtonRenderer so it does not render using visual styles, this is the solution I am looking for. Having no styling for any buttons is preferable.
This is for a project I am working on for my company. We have Visual Studio 2005 .NET Team Edition (per customer request), and are gold certified (which I don't want to give up community support/supporting the community, but is there any programming forums for us where our answers could be answered before 24 hours and/or the questions goes into consideration when microsoft develops tool?).
To me it seems silly to have Visual Styles enable-able for the whole application, when dealing with the windows api, individual windows/controls can easily be themed or unthemed.
I currently have a sub that has a string builder that I'm wish to use as the content of a CSV which I will email later from a webpage. My stringbuilder is creating the content for the CSV but I don't know how to create the CSV dynamically (I don't want the CSV on disk).
Private Shared Sub BuildClientTrustBalanceCSV(ByVal sb As StringBuilder, ByVal clientsWithTrustBalance As List(Of NonPaymentHistory)) If clientsWithTrustBalance Is Nothing OrElse clientsWithTrustBalance.Count = 0 Then
I have a form as Dashboards. I want to automatically refresh data without the data being read from the database and the user are shown.What is the best late for this scenario? I did this using a timer, but the best for this scenario is late?
I need to create a label for every cell in excel that has a value depending on search criteria.Depending on what number is searched i need to display all cells in the row in different labels. There could be one label that needs to be created or many.Do i have to have each variable named differently or can i just use one label tag and give each label a different label.location = (x, y).
I was wondering if some of you can help me with a problem I can't seem to get around. I've got a database that contains a list of users who are connected to an application. The usernames and number of users connected will be random. What I need to do is to display two dynamic text boxes and also have a dynamic tooltip for each of the text boxes for each user displayed. If you look at the attached screenshot I drafted up, I'll only use the first user 'John' for this example.I will hardcode my example because getting the data from the database isn't the issue I'm having. My problem is figuring out how to make the text boxes and tooltips unique for each time someone visits the form. I would also like to be able to set the text within the boxes as well. So, I would need two textboxes for John called:
I am attempting to create a long range calendar that dynamically loads (and unloads) event data as the user scrolls left or right through time. I'm really struggling to figure out how to lay the basic framework of the UI out and how to dynamically build the interface as the user scrolls by clicking and dragging the mouse in the view area. See the image below for a basic diagram of the intent. Each slice would have potentially multiple rectangles in it for events that occurred on that day (slice). I would like each slice to be a canvas to allow me to position those rectangles appropriately.
There are a few problems that I am not yet sure how to tackle but this is the first big one that I've been mulling over for a while and can't quite wrap my head around:
I know how to dynamically create controls but how would I go about adding things to one end of the scrollable content while removing things from the other depending on the way the user is scrolling?
I'm trying to create a dynamic jagged array. That is, one that i can increase the size of at runtime. Maybe its easier if I show you. I have a folder containing a varied number of files. What I want to do is set up a jagged array, with the file contents as the second array. So kind of like this:
However, it throws a System.NullReferenceExeption when I try that. In addition, I don't understand jagged arrays all that well....Here is my code (that doesn't work). The jagged array must be accessible by other methods.
I have to ask my first question at some point, so here she goes.I am trying to create a dynamic list of objects. The objects will have several types (String, Integer) associated with them. Currently I am forming a Collection as I instantiate new objects.Is there a prefered to map this collection to, say, a Datagridview? Will I have to Iterate through the collection and add the rows at each iteration?Would I be better served using an ArrayList or something else over a Collection?
I'm triying to create a dynamic query to Entity FW (i'm using Self tracking Entities over EF)
This is what i'm doing:
Public Class Specification(Of TEntity As Class) Private _predicado As Expression(Of Func(Of TEntity, Boolean)) Public Sub New(ByVal columna As String, ByVal condicion As OperadoresComparacion, ByVal valor As Object)
Currently I create a thread the following way (the normal way)
Public loginThread As Thread Public loginThreadStart As New ThreadStart(AddressOf LogIntoWhatever) Public callLoggedIn As New MethodInvoker(AddressOf loggedIn)
However, what I want to be able to do is something along the lines of (this obviously does not work, and is entirely pseudocode)
dim i as integer = 0 for i = 0 to i = 25 Public loginThread(i) as Thread Public loginThreadStart(i) as New ThreadStart(AddressOf LogIntoWhatever) next i Public callLoggedIn as new MethodInvoker(AddressOf loggedIn)
Where I could change 25 to whatever I wanted and have that number of threads created. They would all be running an identical sub which does do not make calls of any kind to each other, they don't need knowledge of each other. Is anything like this possible?
I'm a junior VB programmer and looking for some advice on this subject. I'm trying to create a chunk of code that will create dynamic storage for variables for use later by dynamic custom controls.
For example: An INI file might have an entry in it that looks something this: .... [var1] <-- this becomes the Storage name description=My Variable type=System.Int32 <-- this could be any valid VB type last_val=456 <-- Other code would save the last value ....
And I want to access the data using a standard "property set" like so after it's created: var1_reference.value = 55 I've tried using a generic class which works ok as long as I declare the variables at design time from within the design environment. But when I try to create them from the INI file it gets messy.
Here's the simple generic class i've constructed to test this: Public Class GenericVar(Of T) ' ' Generic Symbol Class for data storage ' Private VarName As String Private VarType As Type [Code] .....
Also, as each object is created (and they could be different types) I store a reference in an array to make it easier to keep track of, but I'm having a hard time getting access to the objects and their properties, and certainly cant seem to assign an event handler to it once its in an arraylist because the design time code doesn't know what "Type" it is in the arraylist of objects.
I have 10 textboxes. I want to make a certain number of these textboxes visible. The user enters a number from 1 to 10 to determine how many textboxes are visible.The textboxes are named textbox1, textbox2, .... , textbox10How do I set up a simple for loop to accomplish this?
I have never dealt with dynamic control events before. I have a variable number of a controls each created at runtime. However I don't know how to code events for each control as they should do different things. I've looked at WithEvents and AddHandler and know I have to use Sender however not sure how to use /where to put eg. MouseEnter 1 panel when there's several.
I'm having trouble getting controls in non active tabs to update. I have a tab control with 12 tabs. Each tab displays a custom calendar of days for each month. For each of the days I used label controls. Now the trouble im having is when I re-size the window I want the day labels in each tab to re-size accordingly. I have the re-size function written and working but for some reason it will only re-size the active tab. In order for me to have the labels on the other tabs update to the re-size I need to open each tab as to load it then it will update the controls.I've tried putting Application.DoEvents() in my re-size loop but that didn't work. How can I get the other tabs to update / redraw the controls without having to open the tabs first?
I currently use SiteMapPath to generate a breadcrumb for my ASP.net 3.5 (vb.net) pages and it works great.
Now I am trying to figure out how I might be able to use the same control to build a dynamic page title (in the tag). I want a reverse path listed, but the SiteMapPath control includes links and bunch of styling spans. Is there any way to remove all of that, and just get a plain path with separators?
For example, Let's say we are on the "Press Releases" page inside of the "About" section of my site.
The breadcrumb shows up as:
Home > About > Press Releases
I want to have the page title be:
Press Releases - About - Company Name
So I need it to reverse the order, drop all spans, links and styling (since this is inside the tag) and drop the root node "Home" and then add the company name to the end. Since my menu nav and breadrumbs are all driven from the sitemap file, I thought it would make sense to try to make the title do the same.
Currently i only managed to implement the google map(static) into my application,but i want to replace it with a dynamic map. Is there any website or example for me to refer? I tried reading up google API website, but i still dont get it.
I create multiple dynamic pictureboxes and it are to many to add them all manually, is there a way I can e.g. use an integer which adds up every time a new picturebox is made. Then I want to add the same code to every picturebox. Now it creates the picturebox and moves it to the next spot and doesn't create a second. I am using this code if its helpfull:
On runtime about the number of columns to show (mainly remove columns that are available and then shift the remaining columns).. I can view the reports in a report viewer normally all I need is to be able to edit the columns in run time.
With Button click i have to create dynamic 3 Labels in a Panel or panel. First Label show text from TextBox1. Second Label show text from TextBox2 And the last show date from DatetimePicker.
First problem: I have find some code to create one label but not 3 labels with different text each one. How to create this 3 different labels with different text? Each one under the previous. Second problem: When i create a label and close the form - Next time when i open again the form none label has saved. The Panel is clear. How to save that dynamic created labels?
I'm creating 10 web browsers at runtime, they are all in WBS() array and i need "navigated" event for all of them with ability to identify sender. Either 1 event for this array or event for all web browsers and then i would just check it they are the ones from array.